def _value_of_origin_args(origin: object, args: Sequence[object], val: object, ctx: Context, is_typeddict: bool=False) -> Value:
    if ((origin is typing.Type) or (origin is type)):
        if (not args):
            return TypedValue(type)
        return SubclassValue.make(_type_from_runtime(args[0], ctx))
    elif ((origin is typing.Tuple) or (origin is tuple)):
        if (not args):
            return TypedValue(tuple)
        elif ((len(args) == 2) and (args[1] is Ellipsis)):
            return GenericValue(tuple, [_type_from_runtime(args[0], ctx)])
        elif ((len(args) == 1) and (args[0] == ())):
            return SequenceIncompleteValue(tuple, [])
        else:
            args_vals = [_type_from_runtime(arg, ctx) for arg in args]
            return SequenceIncompleteValue(tuple, args_vals)
    elif (origin is typing.Union):
        return unite_values(*[_type_from_runtime(arg, ctx) for arg in args])
    elif ((origin is Callable) or (origin is typing.Callable)):
        if (len(args) == 0):
            return TypedValue(Callable)
        (*arg_types, return_type) = args
        if ((len(arg_types) == 1) and isinstance(arg_types[0], list)):
            arg_types = arg_types[0]
        params = _callable_args_from_runtime(arg_types, 'Callable', ctx)
        sig = Signature.make(params, _type_from_runtime(return_type, ctx))
        return CallableValue(sig)
    elif is_typing_name(origin, 'Annotated'):
        (origin, metadata) = args
        if (not isinstance(metadata, Iterable)):
            ctx.show_error('Unexpected format in Annotated')
            return AnyValue(AnySource.error)
        return _make_annotated(_type_from_runtime(origin, ctx), [KnownValue(data) for data in metadata], ctx)
    elif isinstance(origin, type):
        origin = _maybe_get_extra(origin)
        if args:
            args_vals = [_type_from_runtime(val, ctx) for val in args]
            return GenericValue(origin, args_vals)
        else:
            return _maybe_typed_value(origin)
    elif is_typing_name(origin, 'TypeGuard'):
        if (len(args) != 1):
            ctx.show_error('TypeGuard requires a single argument')
            return AnyValue(AnySource.error)
        return AnnotatedValue(TypedValue(bool), [TypeGuardExtension(_type_from_runtime(args[0], ctx))])
    elif is_typing_name(origin, 'Final'):
        if (len(args) != 1):
            ctx.show_error('Final requires a single argument')
            return AnyValue(AnySource.error)
        return _type_from_runtime(args[0], ctx)
    elif is_typing_name(origin, 'ClassVar'):
        if (len(args) != 1):
            ctx.show_error('ClassVar requires a single argument')
            return AnyValue(AnySource.error)
        return _type_from_runtime(args[0], ctx)
    elif is_typing_name(origin, 'Required'):
        if (not is_typeddict):
            ctx.show_error('Required[] used in unsupported context')
            return AnyValue(AnySource.error)
        if (len(args) != 1):
            ctx.show_error('Required[] requires a single argument')
            return AnyValue(AnySource.error)
        return Pep655Value(True, _type_from_runtime(args[0], ctx))
    elif is_typing_name(origin, 'NotRequired'):
        if (not is_typeddict):
            ctx.show_error('NotRequired[] used in unsupported context')
            return AnyValue(AnySource.error)
        if (len(args) != 1):
            ctx.show_error('NotRequired[] requires a single argument')
            return AnyValue(AnySource.error)
        return Pep655Value(False, _type_from_runtime(args[0], ctx))
    elif ((origin is None) and isinstance(val, type)):
        return _maybe_typed_value(val)
    else:
        ctx.show_error(f"Unrecognized annotation {origin}[{', '.join(map(repr, args))}]")
        return AnyValue(AnySource.error)
def _value_of_origin_args(origin: object, args: Sequence[object], val: object, ctx: Context, is_typeddict: bool=False) -> Value:
    if ((origin is typing.Type) or (origin is type)):
        if (not args):
            return TypedValue(type)
        return SubclassValue.make(_type_from_runtime(args[0], ctx))
    elif ((origin is typing.Tuple) or (origin is tuple)):
        if (not args):
            return TypedValue(tuple)
        elif ((len(args) == 2) and (args[1] is Ellipsis)):
            return GenericValue(tuple, [_type_from_runtime(args[0], ctx)])
        elif ((len(args) == 1) and (args[0] == ())):
            return SequenceIncompleteValue(tuple, [])
        else:
            args_vals = [_type_from_runtime(arg, ctx) for arg in args]
            return SequenceIncompleteValue(tuple, args_vals)
    elif (origin is typing.Union):
        return unite_values(*[_type_from_runtime(arg, ctx) for arg in args])
    elif ((origin is Callable) or (origin is typing.Callable)):
        if (len(args) == 0):
            return TypedValue(Callable)
        (*arg_types, return_type) = args
        if ((len(arg_types) == 1) and isinstance(arg_types[0], list)):
            arg_types = arg_types[0]
        params = _callable_args_from_runtime(arg_types, 'Callable', ctx)
        sig = Signature.make(params, _type_from_runtime(return_type, ctx))
        return CallableValue(sig)
    elif is_typing_name(origin, 'Annotated'):
        (origin, metadata) = args
        if (not isinstance(metadata, Iterable)):
            ctx.show_error('Unexpected format in Annotated')
            return AnyValue(AnySource.error)
        return _make_annotated(_type_from_runtime(origin, ctx), [KnownValue(data) for data in metadata], ctx)
    elif isinstance(origin, type):
        origin = _maybe_get_extra(origin)
        if args:
            args_vals = [_type_from_runtime(val, ctx) for val in args]
            return GenericValue(origin, args_vals)
        else:
            return _maybe_typed_value(origin)
    elif is_typing_name(origin, 'TypeGuard'):
        if (len(args) != 1):
            ctx.show_error('TypeGuard requires a single argument')
            return AnyValue(AnySource.error)
        return AnnotatedValue(TypedValue(bool), [TypeGuardExtension(_type_from_runtime(args[0], ctx))])
    elif is_typing_name(origin, 'Final'):
        if (len(args) != 1):
            ctx.show_error('Final requires a single argument')
            return AnyValue(AnySource.error)
        return _type_from_runtime(args[0], ctx)
    elif is_typing_name(origin, 'ClassVar'):
        if (len(args) != 1):
            ctx.show_error('ClassVar requires a single argument')
            return AnyValue(AnySource.error)
        return _type_from_runtime(args[0], ctx)
    elif is_typing_name(origin, 'Required'):
        if (not is_typeddict):
            ctx.show_error('Required[] used in unsupported context')
            return AnyValue(AnySource.error)
        if (len(args) != 1):
            ctx.show_error('Required[] requires a single argument')
            return AnyValue(AnySource.error)
        return Pep655Value(True, _type_from_runtime(args[0], ctx))
    elif is_typing_name(origin, 'NotRequired'):
        if (not is_typeddict):
            ctx.show_error('NotRequired[] used in unsupported context')
            return AnyValue(AnySource.error)
        if (len(args) != 1):
            ctx.show_error('NotRequired[] requires a single argument')
            return AnyValue(AnySource.error)
        return Pep655Value(False, _type_from_runtime(args[0], ctx))
    elif ((origin is None) and isinstance(val, type)):
        return _maybe_typed_value(val)
    else:
        ctx.show_error(f"Unrecognized annotation {origin}[{', '.join(map(repr, args))}]")
        return AnyValue(AnySource.error)