def _make_callable_from_value(args: Value, return_value: Value, ctx: Context, is_asynq: bool=False) -> Value:
    return_annotation = _type_from_value(return_value, ctx)
    if (args == KnownValue(Ellipsis)):
        return CallableValue(Signature.make([ELLIPSIS_PARAM], return_annotation=return_annotation, is_asynq=is_asynq))
    elif isinstance(args, SequenceIncompleteValue):
        params = [SigParameter(f'__arg{i}', kind=ParameterKind.POSITIONAL_ONLY, annotation=_type_from_value(arg, ctx)) for (i, arg) in enumerate(args.members)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, KnownValue) and is_instance_of_typing_name(args.val, 'ParamSpec')):
        annotation = TypeVarValue(args.val, is_paramspec=True)
        params = [SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=annotation)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, TypeVarValue) and args.is_paramspec):
        params = [SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=args)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, _SubscriptedValue) and isinstance(args.root, KnownValue) and is_typing_name(args.root.val, 'Concatenate')):
        annotations = [_type_from_value(arg, ctx) for arg in args.members]
        params = [SigParameter(f'__arg{i}', kind=(ParameterKind.PARAM_SPEC if (i == (len(annotations) - 1)) else ParameterKind.POSITIONAL_ONLY), annotation=annotation) for (i, annotation) in enumerate(annotations)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    else:
        ctx.show_error(f'Unrecognized Callable type argument {args}')
        return AnyValue(AnySource.error)
def _make_callable_from_value(args: Value, return_value: Value, ctx: Context, is_asynq: bool=False) -> Value:
    return_annotation = _type_from_value(return_value, ctx)
    if (args == KnownValue(Ellipsis)):
        return CallableValue(Signature.make([ELLIPSIS_PARAM], return_annotation=return_annotation, is_asynq=is_asynq))
    elif isinstance(args, SequenceIncompleteValue):
        params = [SigParameter(f'__arg{i}', kind=ParameterKind.POSITIONAL_ONLY, annotation=_type_from_value(arg, ctx)) for (i, arg) in enumerate(args.members)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, KnownValue) and is_instance_of_typing_name(args.val, 'ParamSpec')):
        annotation = TypeVarValue(args.val, is_paramspec=True)
        params = [SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=annotation)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, TypeVarValue) and args.is_paramspec):
        params = [SigParameter('__P', kind=ParameterKind.PARAM_SPEC, annotation=args)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    elif (isinstance(args, _SubscriptedValue) and isinstance(args.root, KnownValue) and is_typing_name(args.root.val, 'Concatenate')):
        annotations = [_type_from_value(arg, ctx) for arg in args.members]
        params = [SigParameter(f'__arg{i}', kind=(ParameterKind.PARAM_SPEC if (i == (len(annotations) - 1)) else ParameterKind.POSITIONAL_ONLY), annotation=annotation) for (i, annotation) in enumerate(annotations)]
        sig = Signature.make(params, return_annotation, is_asynq=is_asynq)
        return CallableValue(sig)
    else:
        ctx.show_error(f'Unrecognized Callable type argument {args}')
        return AnyValue(AnySource.error)