code: def get_torch_optimizer(optimizer):
      if isinstance(optimizer, Optimizer):
          return optimizer
  
      if hasattr(optimizer, "optimizer") and isinstance(
          optimizer.optimizer, Optimizer
      ):
          return optimizer.optimizer
  
      raise TypeError(
          "{} is not a subclass of torch.optim.Optimizer".format(
              type(optimizer).__name__
          )
      )
  
imports: import argparse
  from torch.optim import Optimizer
  import math
  from deepspeed.utils import logger
label_desc: Use image node_id 9 for calling a global function with example usage: get_torch_optimizer(optimizer) and returns: optimizer, optimizer