code: def dirichlet_like(template_categorical, scale=1.0):
      """
      Helper function to construct a Dirichlet distribution based on an existing Categorical distribution
      """
  
      if not is_obj_array(template_categorical):
          warnings.warn(
              "Input array is not an object array...\
                      Casting the input to an object array"
          )
          template_categorical = to_obj_array(template_categorical)
  
      n_sub_arrays = len(template_categorical)
  
      dirichlet_out = obj_array(n_sub_arrays)
  
      for i, arr in enumerate(template_categorical):
          dirichlet_out[i] = scale * arr
  
      return dirichlet_out
  
imports: import numpy
  import pandas
  import seaborn
  import matplotlib.pyplot
  import warnings
  import itertools
label_desc: Use image node_id 14 for calling a global function with example usage: dirichlet_like(template_categorical, scale) and returns: dirichlet_out