code: def plot_labelled_categorical_stats(
      cls, labelled_stats, all_stats, label_column, feature_column
  ):
      y = list(all_stats.frequency_count.keys())
      counter = Counter({label: 0 for label in y})
      legends = []
      plots = []
  
      for _class, _stats in labelled_stats.items():
          frequency = _stats.frequency_count
          left = [dict(counter)[key] for key in y]
          height = [frequency[key] for key in y]
          p = plt.barh(width=height, y=y, left=left)
          counter.update(Counter(frequency))
          legends.append(_class)
          plots.append(p)
      plt.legend(plots, legends)
      plt.title(
          "Distribution: %s - %s" % (label_column, feature_column)
      )
      plt.ylabel(feature_column)
      plt.show()
  
      plt.barh(
          width=list(all_stats.frequency_count.values()),
          y=list(all_stats.frequency_count.keys()),
      )
      plt.title("All Distribution - %s" % feature_column)
      plt.ylabel(feature_column)
      plt.show()
  
file_path: contextual-ai/xai/plots/data_stats_notebook_plots.py
imports: from collections import Counter
  import matplotlib.pyplot
  import pandas
  import numpy
  import seaborn
  from IPython.display import display, Markdown
label_desc: Use image node_id 2 for calling the NotebookPlots obj's underlying member method code with example usage: obj.plot_labelled_categorical_stats(cls, labelled_stats, all_stats, label_column, feature_column) without return types