code: def optimise_cts_hps_for_given_dscr_hps_in_add_model(
      given_dscr_hps,
      num_groups_per_group_size,
      dim,
      hp_tune_max_evals,
      cts_hp_optimise,
      tuning_objective,
  ):
      """Optimises the continuous hyper-parameters for an additive model."""
      group_size = given_dscr_hps[-1]  # The first is the max group size
      if num_groups_per_group_size < 0:
          if group_size == 1:
              num_groups_per_group_size = 1
          else:
              num_groups_per_group_size = max(5, min(2 * dim, 25))
      grp_best_hps = None
      grp_best_val = -np.inf
      grp_best_other_params = None
      # Now try out different groups picking a random grouping each time.
      for _ in range(num_groups_per_group_size):
          rand_perm = list(np.random.permutation(dim))
          groupings = [
              rand_perm[i : i + group_size]
              for i in range(0, dim, group_size)
          ]
          other_gp_params = Namespace(add_gp_groupings=groupings)
          # _tuning_objective is usually defined in gp_core.py
          cts_tuning_objective = lambda arg: tuning_objective(
              arg, given_dscr_hps[:], other_gp_params=other_gp_params
          )
          max_evals = int(
              max(500, hp_tune_max_evals / num_groups_per_group_size)
          )
          opt_cts_val, opt_cts_hps, _ = cts_hp_optimise(
              cts_tuning_objective, max_evals
          )
          if opt_cts_val > grp_best_val:
              grp_best_val = opt_cts_val
              grp_best_hps = opt_cts_hps
              grp_best_other_params = other_gp_params
      return grp_best_val, grp_best_hps, grp_best_other_params
  
imports: from __future__ import division
  from argparse import Namespace
  import numpy
  from .None import gp_core, mf_gp
  from .None import kernel
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.general_utils import get_sublist_from_indices, map_to_bounds
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.oper_utils import random_sample_from_discrete_domain
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 1 for calling a global function with example usage: optimise_cts_hps_for_given_dscr_hps_in_add_model(given_dscr_hps, num_groups_per_group_size, dim, hp_tune_max_evals, cts_hp_optimise, tuning_objective) and returns: grp_best_val,  grp_best_hps,  grp_best_other_params