def _callable_args_from_runtime(arg_types: Any, label: str, ctx: Context) -> Sequence[SigParameter]:
    if ((arg_types is Ellipsis) or (arg_types == [Ellipsis])):
        return [ELLIPSIS_PARAM]
    elif (type(arg_types) in (tuple, list)):
        if (len(arg_types) == 1):
            (arg,) = arg_types
            if (arg is Ellipsis):
                return [ELLIPSIS_PARAM]
            elif is_typing_name(getattr(arg, '__origin__', None), 'Concatenate'):
                return _args_from_concatenate(arg, ctx)
            elif is_instance_of_typing_name(arg, 'ParamSpec'):
                param_spec = TypeVarValue(arg, is_paramspec=True)
                param = SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=param_spec)
                return [param]
        types = [_type_from_runtime(arg, ctx) for arg in arg_types]
        params = [SigParameter(f'__arg{i}', kind=(ParameterKind.PARAM_SPEC if (isinstance(typ, TypeVarValue) and typ.is_paramspec) else ParameterKind.POSITIONAL_ONLY), annotation=typ) for (i, typ) in enumerate(types)]
        return params
    elif is_instance_of_typing_name(arg_types, 'ParamSpec'):
        param_spec = TypeVarValue(arg_types, is_paramspec=True)
        param = SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=param_spec)
        return [param]
    elif is_typing_name(getattr(arg_types, '__origin__', None), 'Concatenate'):
        return _args_from_concatenate(arg_types, ctx)
    else:
        ctx.show_error(f'Invalid arguments to {label}: {arg_types!r}')
        return [ELLIPSIS_PARAM]
def _callable_args_from_runtime(arg_types: Any, label: str, ctx: Context) -> Sequence[SigParameter]:
    if ((arg_types is Ellipsis) or (arg_types == [Ellipsis])):
        return [ELLIPSIS_PARAM]
    elif (type(arg_types) in (tuple, list)):
        if (len(arg_types) == 1):
            (arg,) = arg_types
            if (arg is Ellipsis):
                return [ELLIPSIS_PARAM]
            elif is_typing_name(getattr(arg, '__origin__', None), 'Concatenate'):
                return _args_from_concatenate(arg, ctx)
            elif is_instance_of_typing_name(arg, 'ParamSpec'):
                param_spec = TypeVarValue(arg, is_paramspec=True)
                param = SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=param_spec)
                return [param]
        types = [_type_from_runtime(arg, ctx) for arg in arg_types]
        params = [SigParameter(f'__arg{i}', kind=(ParameterKind.PARAM_SPEC if (isinstance(typ, TypeVarValue) and typ.is_paramspec) else ParameterKind.POSITIONAL_ONLY), annotation=typ) for (i, typ) in enumerate(types)]
        return params
    elif is_instance_of_typing_name(arg_types, 'ParamSpec'):
        param_spec = TypeVarValue(arg_types, is_paramspec=True)
        param = SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=param_spec)
        return [param]
    elif is_typing_name(getattr(arg_types, '__origin__', None), 'Concatenate'):
        return _args_from_concatenate(arg_types, ctx)
    else:
        ctx.show_error(f'Invalid arguments to {label}: {arg_types!r}')
        return [ELLIPSIS_PARAM]