code: def _argparse_type_encoder(arg: Any) -> Type:
      """
      Transforms arguments passed to `optimizer_argparse.__call__`
      at runtime to construct the key used for method lookup as
      `tuple(map(arg_transform, args))`.
  
      This custom arg_transform allow type variables to be passed
      at runtime.
      """
      # Allow type variables to be passed as arguments at runtime
      return arg if isinstance(arg, type) else type(arg)
  
file_path: Ax/ax/utils/common/typeutils.py
imports: from inspect import signature
  from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar
  import numpy
  from typeguard import check_type
label_desc: Use image node_id 9 for calling a global function with example usage: _argparse_type_encoder(arg) and returns: unknown