code: def register_scheduler_params(
      name: str, scheduler_params: SchedulerParams
  ):
      """
      Checks if the schduler config name exists in the registry, and if it doesnt, adds it.
  
      This allows custom schedulers to be added and called by name during instantiation.
  
      Args:
          name: Name of the optimizer. Will be used as key to retrieve the optimizer.
          scheduler_params: SchedulerParams class
      """
      if name in AVAILABLE_SCHEDULER_PARAMS:
          raise ValueError(
              f"Cannot override pre-existing optimizers. Conflicting optimizer name = {name}"
          )
  
      AVAILABLE_SCHEDULER_PARAMS[name] = scheduler_params
  
imports: from dataclasses import dataclass
  from functools import partial
  from typing import Any, Dict, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: register_scheduler_params(name, scheduler_params) without return types