code: def random_sample_from_discrete_domain(dscr_vals, num_points=None):
      """Samples from a discrete domain."""
  
      def _sample_single_point():
          """Samples a single point."""
          return [np.random.choice(categ) for categ in dscr_vals]
  
      # Now draw num_points of them
      num_points_to_sample = 1 if num_points is None else num_points
      if len(dscr_vals) == 0:
          ret = [[]] * num_points_to_sample
      else:
          ret = [
              _sample_single_point()
              for _ in range(num_points_to_sample)
          ]
      if num_points is None:
          return ret[0]
      else:
          return ret
  
imports: from __future__ import print_function
  from __future__ import division
  from argparse import Namespace
  from datetime import datetime
  from warnings import warn
  import os
  import numpy
  from .general_utils import map_to_bounds
  from .doo import DOOFunction, pdoo_wrap
label_desc: Use image node_id 16 for calling a global function with example usage: random_sample_from_discrete_domain(dscr_vals, num_points) and returns: unknown, ret, ret