code: def random_sampling_discrete(param_values, num_samples):
      """Picks uniformly random samples from a discrete set of values.
      param_values is a list of lists where each internal list is the set of values
      for each parameter."""
      num_params = len(param_values)
      ret_vals_for_each_param = []
      for i in range(num_params):
          rand_idxs = np.random.randint(
              0, len(param_values[i]), size=(num_samples,)
          )
          ret_vals_for_each_param.append(
              [param_values[i][idx] for idx in rand_idxs]
          )
      # Now put them into an num_samples x num_params array
      ret = []
      for j in range(num_samples):
          curr_sample = [
              ret_vals_for_each_param[param_idx][j]
              for param_idx in range(num_params)
          ]
          ret.append(curr_sample)
      return ret
  
imports: from argparse import Namespace
  import numpy
  from .cp_domain_utils import get_processed_from_raw_via_config, get_raw_from_processed_via_config, sample_from_cp_domain
  from ..utils.general_utils import map_to_bounds, flatten_list_of_lists
  from ..utils.oper_utils import direct_ft_maximise, latin_hc_sampling, pdoo_maximise, random_maximise
label_desc: Use image node_id 3 for calling a global function with example usage: random_sampling_discrete(param_values, num_samples) and returns: ret