code: def _apply_pytorch_argparse_attrs(action, attrs, flag_name):
      assert hasattr(action.type, "__name__"), action
      action_name = action.type.__name__
      if _is_bool_type(action_name):
          attrs["type"] = None
          attrs["default"] = _bool_default(action.default)
      elif action_name == "_int_or_float_type":
          attrs["type"] = "number"
      elif action_name == "_gpus_allowed_type":
          attrs["type"] = "string"
      elif action_name == "_precision_allowed_type":
          attrs["choices"] = [16, 32, 64]
          attrs["type"] = "int"
      else:
          log.warning(
              "unknown pytorch argparse function %s for flag %s: using default attrs",
              action.type,
              flag_name,
          )
  
file_path: guildai/guild/plugins/pytorch_flags.py
imports: import logging
  from .import_argparse_flags_main import ArgparseActionFlagsImporter
  from .import_argparse_flags_main import default_flag_attrs_for_argparse_action
label_desc: Use image node_id 2 for calling a global function with example usage: _apply_pytorch_argparse_attrs(action, attrs, flag_name) without return types