code: def sample_obj_array(arr):
      """
      Sample from set of Categorical distributions, stored in the sub-arrays of an object array
      """
  
      samples = [sample(arr_i) for arr_i in arr]
  
      return samples
  
imports: import numpy
  import pandas
  import seaborn
  import matplotlib.pyplot
  import warnings
  import itertools
label_desc: Use image node_id 2 for calling a global function with example usage: sample_obj_array(arr) and returns: samples