docstr: Draw information of distribution on data set
  
  Args:
      notes(str): Explain the block
      data_set_distribution (tuple: (str,dict)):
          - tuple[0] str: label/split name
          - tuple[1] dict: key: class name, value: class count
      max_class_shown (int, Optional): maximum number of classes shown
                    in the figure, default is 20
docstr_tok: ["Draw","information","of","distribution","on","data","set","Args",":","notes","(","str",")",":","Explain","the","block","data_set_distribution","(","tuple",":","(","str",",","dict",")",")",":","-","tuple","[","0","]","str",":","label\/split","name","-","tuple","[","1","]","dict",":","key",":","class","name",",","value",":","class","count","max_class_shown","(","int",",","Optional",")",":","maximum","number","of","classes","shown","in","the","figure",",","default","is","20"]
code: def draw_data_set_distribution(
      self,
      notes: str,
      *,
      data_set_distribution: Tuple[str, Dict],
      max_class_shown=20,
  ):
      """
      Draw information of distribution on data set
  
      Args:
          notes(str): Explain the block
          data_set_distribution (tuple: (str,dict)):
              - tuple[0] str: label/split name
              - tuple[1] dict: key: class name, value: class count
          max_class_shown (int, Optional): maximum number of classes shown
                        in the figure, default is 20
      """
      from xai.graphs import graph_generator
  
      def get_data_set_distribution():
          table_header = ["", "Count", "Distribution"]
          table_data = []
          for dataset_name, dataset_dist in data_set_distribution:
              table_data.append(
                  [
                      dataset_name,
                      sum(list(dataset_dist.values())),
                      "See below graphs",
                  ]
              )
          return table_header, table_data, [80, 40, 60]
  
      # -- Draw Content --
      self.pdf.add_new_line(notes)
      (
          _table_header,
          _table_data,
          _col_width,
      ) = get_data_set_distribution()
      self.pdf.add_table(
          _table_header, _table_data, col_width=_col_width
      )
  
      for _dataset_name, _dataset_dist in data_set_distribution:
          self.pdf.add_new_line(
              "Distribution for <B>%s</B>" % _dataset_name
          )
          if len(_dataset_dist) > max_class_shown:
              self.pdf.add_new_line(
                  "(Only %s shown amount %s classes)"
                  % (max_class_shown, len(_dataset_dist))
              )
          image_path = graph_generator.BarPlot(
              file_path="%s/%s_data_distribution.png"
              % (self.figure_path, _dataset_name),
              data=_dataset_dist,
              title="Data Distribution for %s" % _dataset_name,
              x_label="Number of samples",
              y_label="Category",
          ).draw(
              caption=_dataset_name,
              ratio=True,
              limit_length=max_class_shown,
          )
          self.pdf.add_large_image(image_path)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import tempfile
  import warnings
  import numpy
  import shutil
  from typing import Tuple, Dict, List
  from xai import MODE
  from xai.data.constants import DatetimeResolution
  from xai.data.explorer import CategoricalStats, NumericalStats, TextStats, DatetimeStats
  from xai.formatter.contents import Title, SectionTitle, Header
  from xai.formatter.portable_document.publisher import CustomPdf
  from xai.formatter.report.section import OverviewSection, DetailSection
  from xai.formatter.writer import Writer
label_desc: Use image node_id 17 for calling the PdfWriter obj's underlying member method code with example usage: obj.draw_data_set_distribution(notes) and returns: table_header,  table_data,  list