code: def define_experiment_config(config):
      """Create and define the fields of generic experiment configuration."""
      experiment_config = Configuration()
  
      experiment_config.add_option(
          "max_trials",
          option_type=int,
          default=int(10e8),
          env_var="ORION_EXP_MAX_TRIALS",
          help="number of trials to be completed for the experiment. This value "
          "will be saved within the experiment configuration and reused "
          "across all workers to determine experiment's completion. ",
      )
  
      experiment_config.add_option(
          "worker_trials",
          option_type=int,
          default=int(10e8),
          deprecate=dict(
              version="v0.3",
              alternative="worker.max_trials",
              name="experiment.worker_trials",
          ),
          help="This argument will be removed in v0.3. Use --worker-max-trials instead.",
      )
  
      experiment_config.add_option(
          "max_broken",
          option_type=int,
          default=3,
          env_var="ORION_EXP_MAX_BROKEN",
          help=(
              "Maximum number of broken trials before experiment stops."
          ),
      )
  
      experiment_config.add_option(
          "working_dir",
          option_type=str,
          default="",
          env_var="ORION_WORKING_DIR",
          help="Set working directory for running experiment.",
      )
  
      experiment_config.add_option(
          "algorithm",
          option_type=dict,
          default={"random": {"seed": None}},
          help="Algorithm configuration for the experiment.",
      )
  
      experiment_config.add_option(
          "algorithms",
          option_type=dict,
          default={"random": {"seed": None}},
          deprecate=dict(
              version="v0.4",
              alternative="worker.algorithm",
              name="experiment.algorithm",
          ),
          help="This argument will be removed in v0.4. Use algorithm instead",
      )
  
      experiment_config.add_option(
          "strategy",
          option_type=dict,
          default={},
          help=(
              "This option is deprecated and will be removed in v0.4.0. Parallel strategies may "
              "now be set in algorithm configuration."
          ),
      )
  
      config.experiment = experiment_config
  
file_path: orion/src/orion/core/__init__.py
imports: import logging
  import os
  import socket
  from appdirs import AppDirs
  from orion.core.io.config import Configuration
  from ._version import get_versions
label_desc: Use image node_id 5 for calling a global function with example usage: define_experiment_config(config) without return types