code: def ExecutorDataclassField(description: str, default: Dict = {}):
      class ExecutorMarshmallowField(fields.Field):
          def _deserialize(self, value, attr, data, **kwargs):
              if isinstance(value, dict):
                  try:
                      return ExecutorConfig.Schema().load(value)
                  except (TypeError, ValidationError):
                      raise ValidationError(
                          f"Invalid params for executor: {value}, see ExecutorConfig class."
                      )
              raise ValidationError("Field should be dict")
  
          def _jsonschema_type_mapping(self):
              return {
                  **schema_utils.unload_jsonschema_from_marshmallow_class(
                      ExecutorConfig
                  ),
                  "title": "executor",
                  "description": description,
              }
  
      if not isinstance(default, dict):
          raise ValidationError(f"Invalid default: `{default}`")
  
      load_default = lambda: ExecutorConfig.Schema().load(default)
      dump_default = ExecutorConfig.Schema().dump(default)
  
      return field(
          metadata={
              "marshmallow_field": ExecutorMarshmallowField(
                  allow_none=False,
                  load_default=load_default,
                  dump_default=dump_default,
                  metadata={
                      "description": description,
                      "parameter_metadata": None,
                  },
              )
          },
          default_factory=load_default,
      )
  
file_path: ludwig/ludwig/schema/hyperopt/executor.py
imports: from dataclasses import field
  from typing import Dict, Optional, Union
  from marshmallow import fields, ValidationError
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import RAY
  from ludwig.schema import utils
  from ludwig.schema.hyperopt.scheduler import BaseSchedulerConfig, SchedulerDataclassField
  from ludwig.schema.utils import ludwig_dataclass
label_desc: Use image node_id 1 for calling a global function with example usage: ExecutorDataclassField(description, default) and returns: field, dict, ExecutorConfig