def _eval_args(args):
res = []<EOL>for arg in args:<EOL><INDENT>if not isinstance(arg, tuple):<EOL><INDENT>res.append(arg)<EOL><DEDENT>elif is_callable_type(arg[<NUM_LIT:0>]):<EOL><INDENT>callable_args = _eval_args(arg[<NUM_LIT:1>:])<EOL>if len(arg) == <NUM_LIT:2>:<EOL><INDENT>res.append(Callable[[], callable_args[<NUM_LIT:0>]])<EOL><DEDENT>elif arg[<NUM_LIT:1>] is Ellipsis:<EOL><INDENT>res.append(Callable[..., callable_args[<NUM_LIT:1>]])<EOL><DEDENT>else:<EOL><INDENT>res.append(Callable[list(callable_args[:-<NUM_LIT:1>]), callable_args[-<NUM_LIT:1>]])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>res.append(type(arg[<NUM_LIT:0>]).__getitem__(arg[<NUM_LIT:0>], _eval_args(arg[<NUM_LIT:1>:])))<EOL><DEDENT><DEDENT>return tuple(res)<EOL>
Internal helper for get_args.