code: def draw_core(self):
      data_dist = {k: v for (k, v) in sorted(self.data.items())}
      min_year = list(data_dist.keys())[0]
      max_year = list(data_dist.keys())[-1]
  
      earliest = (
          min_year,
          min([int(month) for month in data_dist[min_year].keys()]),
      )
      latest = (
          max_year,
          max([int(month) for month in data_dist[max_year].keys()]),
      )
  
      line_num = len(data_dist)
      data_frame = []
      for year in data_dist:
          year_data = [0] * 13
          year_data[0] = year
          for month in data_dist[year]:
              year_data[int(month)] = int(data_dist[year][month])
          data_frame.append(year_data)
      data_frame = np.array(data_frame).astype(int)
      bars = []
      colors = [
          "#1abc9c",
          "#2ecc71",
          "#3498db",
          "#7f8c8d",
          "#9b59b6",
          "#34495e",
          "#f1c40f",
          "#e67e22",
          "#e74c3c",
          "#95a5a6",
          "#d35400",
          "#bdc3c7",
      ]
      legends = [
          "Jan",
          "Feb",
          "Mar",
          "April",
          "May",
          "Jun",
          "Jul",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec",
      ]
      current_sum = np.zeros(line_num)
      for month in range(1, 13):
          p = plt.barh(
              y=list(range(0, line_num)),
              width=data_frame[:, month].tolist(),
              left=current_sum.tolist(),
              color=colors[month - 1],
          )
          bars.append(p)
          current_sum = data_frame[:, month] + current_sum
      for idx in range(line_num):
          plt.text(
              current_sum[idx],
              idx,
              int(current_sum[idx]),
              color="black",
              ha="left",
          )
  
      plt.yticks(list(range(0, line_num)), list(data_dist.keys()))
      plt.legend(
          bars, legends, bbox_to_anchor=(1.04, 1), loc="upper left"
      )
      plt.title(
          "Date Range: %s.%s - %s.%s"
          % (
              earliest[0],
              legends[earliest[1] - 1],
              latest[0],
              legends[latest[1] - 1],
          )
      )
  
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import seaborn
  import xai.constants
  from wordcloud import WordCloud
  import shap
  from xai.graphs.basic_graph import Graph
  from typing import List
  from collections import Counter
  import operator
  from xai.data.exceptions import NoItemsError
label_desc: Use image node_id 2 for calling the DatePlot obj's underlying member method code with example usage: obj.draw_core() without return types