code: def _set_up_hyperparams_for_domain(
      fitter,
      X_data,
      gp_domain,
      dom_prefix,
      kernel_ordering,
      kernel_params_for_each_domain,
      dist_computers,
      lists_of_dists,
  ):
      """This modifies the fitter object."""
      # pylint: disable=too-many-branches
      for dom_idx, dom, kernel_type in zip(
          range(gp_domain.num_domains),
          gp_domain.list_of_domains,
          kernel_ordering,
      ):
          dom_type = dom.get_type()
          dom_identifier = "%s-%d-%s" % (dom_prefix, dom_idx, dom_type)
          # Kernel type
          if kernel_type == "" or kernel_type is None:
              # If none is specified, use the one given in options
              kernel_type = _get_kernel_type_from_options(
                  dom_type, dom_prefix, fitter.options
              )
          if kernel_type == "default":
              kernel_type = get_default_kernel_type(dom.get_type())
          # Iterate through each individual domain and add it to the hyper parameters
          curr_dom_Xs = get_idxs_from_list_of_lists(X_data, dom_idx)
          # Some conditional options
          if dom_type in [
              "euclidean",
              "integral",
              "prod_discrete_numeric",
              "discrete_euclidean",
          ]:
              (
                  use_same_bw,
                  matern_nu,
                  esp_kernel_type,
                  esp_matern_nu,
              ) = _get_euc_int_options(
                  dom_type, dom_prefix, fitter.options
              )
              # Now set things up depending on the kernel type
              if kernel_type == "se":
                  (
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  ) = _set_up_dim_bandwidths(
                      dom_identifier,
                      curr_dom_Xs,
                      use_same_bw,
                      dom.get_dim(),
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  )
              elif kernel_type == "matern":
                  if isinstance(matern_nu, float) and matern_nu < 0:
                      fitter.dscr_hp_vals.append([0.5, 1.5, 2.5])
                      fitter.param_order.append(
                          [
                              "%s-%s" % (dom_identifier, "matern_nu"),
                              "dscr",
                          ]
                      )
                  (
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  ) = _set_up_dim_bandwidths(
                      dom_identifier,
                      curr_dom_Xs,
                      use_same_bw,
                      dom.get_dim(),
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  )
              elif kernel_type == "poly":
                  raise NotImplementedError(
                      "Not implemented polynomial kernels yet."
                  )
              elif kernel_type == "expdecay":
                  # Offset
                  scale_range = fitter.Y_var / np.sqrt(
                      fitter.num_tr_data + 0.0001
                  )
                  fitter.cts_hp_bounds.append(
                      [
                          np.log(0.1 * scale_range),
                          np.log(10 * scale_range),
                      ]
                  )
                  fitter.param_order.append(
                      [
                          "%s-expdecay_log_offset" % (dom_identifier),
                          "cts",
                      ]
                  )
                  # Power
                  fitter.cts_hp_bounds.extend(
                      [[np.log(1e-1), np.log(50)]] * dom.get_dim()
                  )
                  identifiers = [
                      [
                          "%s-expdecay_log_power-%d"
                          % (dom_identifier, i),
                          "cts",
                      ]
                      for i in range(dom.get_dim())
                  ]
                  fitter.param_order.extend(identifiers)
              elif kernel_type == "esp":
                  (
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  ) = _set_up_dim_bandwidths(
                      dom_identifier,
                      curr_dom_Xs,
                      use_same_bw,
                      dom.get_dim(),
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  )
                  # Matern nu
                  if esp_kernel_type == "matern" and esp_matern_nu < 0:
                      fitter.dscr_hp_vals.append([0.5, 1.5, 2.5])
                      fitter.param_order.append(
                          [
                              "%s-%s"
                              % (dom_identifier, "esp_matern_nu"),
                              "dscr",
                          ]
                      )
                  # ESP order
                  esp_order_vals = range(1, dom.get_dim() // 2)
                  fitter.param_order.append(
                      ["%s-%s" % (dom_identifier, "esp_order"), "dscr"]
                  )
                  fitter.dscr_hp_vals.append(esp_order_vals)
              else:
                  raise ValueError(
                      'Unknown kernel type "%s" for "%s" spaces.'
                      % (kernel_type, dom.get_type())
                  )
          elif dom.get_type() in ["prod_discrete"]:
              if kernel_type == "hamming":
                  (disc_hamming_use_same_weight,) = _get_disc_options(
                      dom_prefix, fitter.options
                  )
                  (
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  ) = _set_up_hamming_weights(
                      dom_identifier,
                      disc_hamming_use_same_weight,
                      dom.get_dim(),
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  )
              else:
                  raise ValueError(
                      'Unknown kernel type "%s" for "%s" spaces.'
                      % (kernel_type, dom.get_type())
                  )
          elif dom.get_type() in ["neural_network"]:
              if kernel_type == "otmann":
                  (
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                  ) = _set_up_nn_domain_otmann(
                      dom_idx,
                      dom,
                      dom_identifier,
                      curr_dom_Xs,
                      fitter.options,
                      fitter.cts_hp_bounds,
                      fitter.param_order,
                      kernel_params_for_each_domain,
                      dist_computers,
                      lists_of_dists,
                  )
              else:
                  raise ValueError(
                      'Unknown kernel type "%s" for "%s" spaces.'
                      % (kernel_type, dom.get_type())
                  )
  
imports: from __future__ import print_function
  from argparse import Namespace
  import numpy
  from ..exd import domains
  from ..exd.cp_domain_utils import load_cp_domain_from_config_file
  from .None import gp_core, mf_gp
  from .euclidean_gp import get_euclidean_integral_gp_kernel_with_scale, prep_euclidean_integral_kernel_hyperparams
  from .kernel import CartesianProductKernel, HammingKernel
  from ..utils.general_utils import get_idxs_from_list_of_lists
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 2 for calling a global function with example usage: _set_up_hyperparams_for_domain(fitter, X_data, gp_domain, dom_prefix, kernel_ordering, kernel_params_for_each_domain, dist_computers, lists_of_dists) without return types