code: def register_torch_optimizers():
      torch_optimizers = []
      for module_name in dir(torch.optim):
          if module_name.startswith("__"):
              continue
          _optim = getattr(torch.optim, module_name)
          if inspect.isclass(_optim) and issubclass(
              _optim, torch.optim.Optimizer
          ):
              OPTIMIZERS.register_module()(_optim)
              torch_optimizers.append(module_name)
      return torch_optimizers
  
imports: import copy
  import inspect
  import torch
  from ...utils import Registry, build_from_cfg
label_desc: Use image node_id 1 for calling a global function with example usage: register_torch_optimizers() and returns: torch_optimizers