code: def create_2d_histogram_plot(
      np_row_wise,
      labels,
      title=None,
      xtitle=None,
      ytitle=None,
      series=None,
      xlabels=None,
      comment=None,
      mode="group",
      data_args=None,
      layout_config=None,
  ):
      """
      Create a 2D Plotly histogram chart from a 2D numpy array
      :param np_row_wise: 2D numpy data array
      :param labels: Histogram labels
      :param title: Chart title
      :param xtitle: X-Series title
      :param ytitle: Y-Series title
      :param xlabels: The labels of the x axis.
      :param comment: comment underneath the title
      :param mode: multiple histograms mode. valid options are: stack / group / relative. Default is 'group'.
      :param data_args: optional extra data configuration
      :param layout_config: optional extra layout configuration
      :return: Plotly chart dict.
      """
      assert mode in ("stack", "group", "relative")
  
      np_row_wise = np.atleast_2d(np_row_wise)
      assert len(np_row_wise.shape) == 2, "Expected a 2D numpy array"
      use_series = bool(labels)
  
      # using labels without xlabels leads to original behavior
      if labels is not None and xlabels is None:
          assert (
              len(labels) == np_row_wise.shape[0]
          ), "Please provide a label for each data row"
      elif xlabels is None:
          fake_label = series or ""
          labels = [fake_label] * np_row_wise.shape[0]
      elif labels:
          if len(labels) == 1:
              labels = [labels] * np_row_wise.shape[0]
          assert len(xlabels) == np_row_wise.shape[1]
      elif not labels and xlabels:
          labels = [series]
  
      data = [
          _np_row_to_plotly_data_item(
              np_row=np_row_wise[i, :],
              label=labels[i] if labels else None,
              xlabels=xlabels,
              data_args=data_args,
          )
          for i in range(np_row_wise.shape[0])
      ]
      return _plotly_hist_dict(
          title=series if use_series else title,
          xtitle=xtitle,
          ytitle=ytitle,
          mode=mode,
          data=data,
          comment=comment,
          layout_config=layout_config,
      )
  
imports: import json
  import numpy
  from ..errors import UsageError
  from ..utilities.dicts import merge_dicts
  from attr import attrs, attrib
label_desc: Use image node_id 1 for calling a global function with example usage: create_2d_histogram_plot(np_row_wise, labels, title, xtitle, ytitle, series, xlabels, comment, mode, data_args, layout_config) and returns: _plotly_hist_dict