code: def create_scheduler(optimizer: Optimizer, cfg: Any) -> Any:
      r"""Creates a config-driven learning rate scheduler."""
      func = register.scheduler_dict.get(cfg.scheduler, None)
      if func is not None:
          return from_config(func)(optimizer, cfg=cfg)
      raise ValueError(f"Scheduler '{cfg.scheduler}' not supported")
  
file_path: pytorch_geometric/torch_geometric/graphgym/optim.py
imports: from dataclasses import dataclass, field
  from typing import Any, Iterator, List, Optional
  from torch.nn import Parameter
  from torch.optim import SGD, Adam, Optimizer
  from torch.optim.lr_scheduler import CosineAnnealingLR, MultiStepLR, StepLR
  import torch_geometric.graphgym.register
  from torch_geometric.graphgym.config import from_config
label_desc: Use image node_id 7 for calling a global function with example usage: create_scheduler(optimizer, cfg) and returns: from_config