code: def random_single_categorical(shape_list):
      """
      Creates a random 1-D categorical distribution (or set of 1-D categoricals, e.g. multiple marginals of different factors) and returns them in an object array
      """
  
      num_sub_arrays = len(shape_list)
  
      out = obj_array(num_sub_arrays)
  
      for arr_idx, shape_i in enumerate(shape_list):
          out[arr_idx] = norm_dist(np.random.rand(shape_i))
  
      return out
  
imports: import numpy
  import pandas
  import seaborn
  import matplotlib.pyplot
  import warnings
  import itertools
label_desc: Use image node_id 12 for calling a global function with example usage: random_single_categorical(shape_list) and returns: out