code: def sample_cts_dscr_hps_for_rand_exp_sampling_in_add_model(
      num_evals,
      cts_hp_bounds,
      dim,
      dscr_hp_vals,
      add_group_size_idx_in_dscr_hp_vals,
      tuning_objective,
  ):
      # IMPORTANT: We are assuming that the add_group_size is the first
      """Samples the hyper-paramers for an additive model."""
      agsidhp = add_group_size_idx_in_dscr_hp_vals
      sample_cts_hps = []
      sample_dscr_hps = []
      sample_other_gp_params = []
      sample_obj_vals = []
      for _ in range(num_evals):
          group_size = np.random.choice(dscr_hp_vals[agsidhp])
          rand_perm = list(np.random.permutation(dim))
          groupings = [
              rand_perm[i : i + group_size]
              for i in range(0, dim, group_size)
          ]
          curr_other_gp_params = Namespace(add_gp_groupings=groupings)
          curr_dscr_hps = random_sample_from_discrete_domain(
              dscr_hp_vals
          )
          curr_dscr_hps[agsidhp] = group_size
          curr_cts_hps = map_to_bounds(
              np.random.random((len(cts_hp_bounds),)), cts_hp_bounds
          )
          curr_obj_val = tuning_objective(
              curr_cts_hps, curr_dscr_hps, curr_other_gp_params
          )
          # Now add to the lists
          sample_cts_hps.append(curr_cts_hps)
          sample_dscr_hps.append(curr_dscr_hps)
          sample_other_gp_params.append(curr_other_gp_params)
          sample_obj_vals.append(curr_obj_val)
      sample_probs = np.exp(sample_obj_vals)
      sample_probs = sample_probs / sample_probs.sum()
      return (
          sample_cts_hps,
          sample_dscr_hps,
          sample_other_gp_params,
          sample_probs,
      )
  
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 2 for calling a global function with example usage: sample_cts_dscr_hps_for_rand_exp_sampling_in_add_model(num_evals, cts_hp_bounds, dim, dscr_hp_vals, add_group_size_idx_in_dscr_hp_vals, tuning_objective) and returns: sample_cts_hps,  sample_dscr_hps,  sample_other_gp_params,  sample_probs