code: def create_scheduler(scheduler_config, optimizer, *args, **kwargs):
      if hasattr(optimizer, "fp32_optimizer"):
          optimizer = optimizer.fp32_optimizer
      return create_component(
          ComponentType.SCHEDULER,
          scheduler_config,
          optimizer,
          *args,
          **kwargs,
      )
  
imports: import collections
  import enum
  from typing import Any, Dict, List, Tuple, Type, Union
  import torch
  from pytext.utils.usage import log_class_usage
  from .pytext_config import ConfigBase, PyTextConfig
label_desc: Use image node_id 8 for calling a global function with example usage: create_scheduler(scheduler_config, optimizer) and returns: create_component