code: def draw_core(self, current_class_label):
      conf = np.array(self.data[Const.KEY_PROBABILITY])
      gt = np.array(self.data[Const.KEY_GROUNDTRUTH])
  
      m = Const.RELIABILITY_BINSIZE
      # process input
      accuracy = np.zeros(conf.shape)
      accuracy[np.where(gt == current_class_label)] = 1
  
      # generate confidence/accuracy
      reliability = []
      for i in range(m):
          lower = 1 / m * i
          upper = 1 / m * (1 + i)
          condition = (conf >= lower) & (conf < upper)
          sample_num = accuracy[condition].shape[0]
          ave_acc = np.sum(accuracy[condition]) / sample_num
          ave_conf = np.mean(conf[condition])
          reliability.append(
              (lower, upper, ave_conf, ave_acc, sample_num)
          )
  
      for item in reliability:
          lower, upper, conf, acc, sample_num = item
          x = plt.bar(
              lower,
              height=acc,
              width=upper - lower,
              bottom=0,
              align="edge",
              color="b",
          )
          ece = conf - acc
          if ece > 0:
              y = plt.bar(
                  lower,
                  height=conf - acc,
                  width=upper - lower,
                  bottom=acc,
                  align="edge",
                  color="r",
                  alpha=0.5,
              )
          else:
              y = plt.bar(
                  lower,
                  height=acc - conf,
                  width=upper - lower,
                  bottom=conf,
                  align="edge",
                  color="r",
                  alpha=0.5,
              )
      plt.legend((x, y), ("accuracy", "gap"))
      plt.title("Reliability for Class %s" % current_class_label)
  
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 ReliabilityDiagramForMultiClass obj's underlying member method code with example usage: obj.draw_core(current_class_label) without return types