@staticmethod
def from_inspect_signature(signature: inspect.Signature) -> 'Signature[inspect.Parameter]':
    runtime_sig = Signature()
    for runtime_arg in signature.parameters.values():
        if (runtime_arg.kind in (inspect.Parameter.POSITIONAL_ONLY, inspect.Parameter.POSITIONAL_OR_KEYWORD)):
            runtime_sig.pos.append(runtime_arg)
        elif (runtime_arg.kind == inspect.Parameter.KEYWORD_ONLY):
            runtime_sig.kwonly[runtime_arg.name] = runtime_arg
        elif (runtime_arg.kind == inspect.Parameter.VAR_POSITIONAL):
            runtime_sig.varpos = runtime_arg
        elif (runtime_arg.kind == inspect.Parameter.VAR_KEYWORD):
            runtime_sig.varkw = runtime_arg
        else:
            raise AssertionError
    return runtime_sig
@staticmethod
def from_inspect_signature(signature: inspect.Signature) -> 'Signature[inspect.Parameter]':
    runtime_sig = Signature()
    for runtime_arg in signature.parameters.values():
        if (runtime_arg.kind in (inspect.Parameter.POSITIONAL_ONLY, inspect.Parameter.POSITIONAL_OR_KEYWORD)):
            runtime_sig.pos.append(runtime_arg)
        elif (runtime_arg.kind == inspect.Parameter.KEYWORD_ONLY):
            runtime_sig.kwonly[runtime_arg.name] = runtime_arg
        elif (runtime_arg.kind == inspect.Parameter.VAR_POSITIONAL):
            runtime_sig.varpos = runtime_arg
        elif (runtime_arg.kind == inspect.Parameter.VAR_KEYWORD):
            runtime_sig.varkw = runtime_arg
        else:
            raise AssertionError
    return runtime_sig