code: def LRSchedulerDataclassField(description: str, default: Dict = None):
      """Returns custom dataclass field for `LRSchedulerConfig`. Allows `None` by default.
  
      Args:
          description: Description of the dataclass field
          default: dict that specifies param values that will be loaded by its schema class (default: None).
      """
      allow_none = True
      default = default or {}
  
      class LRSchedulerMarshmallowField(fields.Field):
          """Custom marshmallow field class for learjing rate scheduler.
  
          Deserializes a dict to a valid instance of `LRSchedulerConfig` and creates a corresponding JSON schema for
          external usage.
          """
  
          def _deserialize(self, value, attr, data, **kwargs):
              if value is None:
                  return value
              if isinstance(value, dict):
                  try:
                      return LRSchedulerConfig.Schema().load(value)
                  except (TypeError, ValidationError) as e:
                      # TODO(travis): this seems much too verbose, does the validation error not show the specific error?
                      raise ValidationError(
                          f"Invalid params for learning rate scheduler: {value}, see LRSchedulerConfig class. Error: {e}"
                      )
              raise ValidationError("Field should be None or dict")
  
          def _jsonschema_type_mapping(self):
              return {
                  **schema_utils.unload_jsonschema_from_marshmallow_class(
                      LRSchedulerConfig
                  ),
                  "title": "learning_rate_scheduler_options",
                  "description": description,
              }
  
      if not isinstance(default, dict):
          raise ValidationError(f"Invalid default: `{default}`")
  
      load_default = lambda: LRSchedulerConfig.Schema().load(default)
      dump_default = LRSchedulerConfig.Schema().dump(default)
  
      return field(
          metadata={
              "marshmallow_field": LRSchedulerMarshmallowField(
                  allow_none=allow_none,
                  load_default=load_default,
                  dump_default=dump_default,
                  metadata={
                      "description": description,
                  },
              )
          },
          default_factory=load_default,
      )
  
file_path: ludwig/ludwig/schema/lr_scheduler.py
imports: from abc import ABC
  from dataclasses import field
  from typing import Dict
  from marshmallow import fields, ValidationError
  import ludwig.schema.utils
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import LOSS, MODEL_ECD, TRAINING
  from ludwig.schema.metadata import TRAINER_METADATA
  from ludwig.schema.utils import ludwig_dataclass
label_desc: Use image node_id 1 for calling a global function with example usage: LRSchedulerDataclassField(description, default) and returns: field, dict, value, LRSchedulerConfig