code: def _plotly_hist_dict(
      title,
      xtitle,
      ytitle,
      mode="group",
      data=None,
      comment=None,
      layout_config=None,
  ):
      """
      Create a basic Plotly chart dictionary
      :param title: Chart title
      :param xtitle: X-Series title
      :param ytitle: Y-Series title
      :param mode: multiple histograms mode. optionals stack / group / relative. Default is 'group'.
      :param data: Data items
      :type data: list
      :param layout_config: dict
      :return: Plotly chart dict.
      """
      assert mode in ("stack", "group", "relative")
  
      plotly_object = {
          "data": data or [],
          "layout": {
              "title": title
              if not comment
              else (title + "<br><sup>" + comment + "</sup>"),
              "xaxis": {"title": xtitle},
              "yaxis": {"title": ytitle},
              "barmode": mode,
              "bargap": 0.08,
              "bargroupgap": 0,
          },
      }
      if layout_config:
          plotly_object["layout"] = merge_dicts(
              plotly_object["layout"], layout_config
          )
  
      return plotly_object
  
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 10 for calling a global function with example usage: _plotly_hist_dict(title, xtitle, ytitle, mode, data, comment, layout_config) and returns: plotly_object