code: def create_scheduler(optimizer):
      r"""Creates a config-driven learning rate scheduler."""
      # Try to load customized scheduler
      for func in register.scheduler_dict.values():
          scheduler = func(optimizer)
          if scheduler is not None:
              return scheduler
      if cfg.optim.scheduler == "none":
          scheduler = optim.lr_scheduler.StepLR(
              optimizer, step_size=cfg.optim.max_epoch + 1
          )
      elif cfg.optim.scheduler == "step":
          scheduler = optim.lr_scheduler.MultiStepLR(
              optimizer,
              milestones=cfg.optim.steps,
              gamma=cfg.optim.lr_decay,
          )
      elif cfg.optim.scheduler == "cos":
          scheduler = optim.lr_scheduler.CosineAnnealingLR(
              optimizer, T_max=cfg.optim.max_epoch
          )
      else:
          raise ValueError(
              "Scheduler {} not supported".format(cfg.optim.scheduler)
          )
      return scheduler
  
imports: import torch.optim
  import graphgym.register
  from graphgym.config import cfg
label_desc: Use image node_id 2 for calling a global function with example usage: create_scheduler(optimizer) and returns: scheduler, scheduler