code: def prep_args(arg_info):
      # type: (ArgInfo) -> ResolvedTypes
      
  
      # pull out any varargs declarations
      filtered_args = [a for a in arg_info.args if getattr(arg_info, 'varargs', None) != a]
  
      # we don't care about self/cls first params (perhaps we can test if it's an instance/class method another way?)
      if filtered_args and (filtered_args[0] in ('self', 'cls')):
          filtered_args = filtered_args[1:]
  
      pos_args = []  # type: List[InternalType]
      if filtered_args:
          for arg in filtered_args:
              if isinstance(arg, str) and arg in arg_info.locals:
                  # here we know that return type will be of type "type"
                  resolved_type = resolve_type(arg_info.locals[arg])
                  pos_args.append(resolved_type)
              else:
                  pos_args.append(type(UnknownType()))
  
      varargs = None  # type: Optional[List[InternalType]]
      if arg_info.varargs:
          varargs_tuple = arg_info.locals[arg_info.varargs]
          # It's unclear what all the possible values for 'varargs_tuple' are,
          # so perform a defensive type check since we don't want to crash here.
          if isinstance(varargs_tuple, tuple):
              varargs = [resolve_type(arg) for arg in varargs_tuple[:4]]
  
      return ResolvedTypes(pos_args=pos_args, varargs=varargs)
docs: Resolve types from ArgInfo