code: def build_histogram_data(self, series):
      hist_kwargs = (
          {"density": True} if self.density else {"bins": self.bins}
      )
      hist_data, hist_labels = np.histogram(series, **hist_kwargs)
      hist_data = [json_float(h) for h in hist_data]
      decimals = 1
      # drop the first bin because of just a minimum
      labels = [
          "".join(["{0:.", "{}".format(decimals), "f}"]).format(lbl)
          for lbl in hist_labels[1:]
      ]
      while len(set(labels)) < len(labels) or decimals > 10:
          decimals += 1
          labels = [
              "".join(["{0:.", "{}".format(decimals), "f}"]).format(lbl)
              for lbl in hist_labels[1:]
          ]
  
      return dict(labels=labels, data=hist_data), hist_labels
  
imports: import numpy
  import pandas
  import plotly.express
  import plotly.graph_objs
  import pprint
  import scipy.stats
  import time
  import dtale.global_state
  import dtale.pandas_util
  from dtale.code_export import build_code_export, build_final_chart_code
  from dtale.column_builders import clean, clean_code
  from dtale.describe import load_describe
  from dtale.query import build_query, load_filterable_data
  from dtale.utils import apply, classify_type, find_dtype, find_dtype_formatter, find_selected_column, get_bool_arg, get_int_arg, get_str_arg, grid_columns, grid_formatter, json_float, json_timestamp, make_list
label_desc: Use image node_id 2 for calling the HistogramAnalysis obj's underlying member method code with example usage: obj.build_histogram_data(series) and returns: dict,  hist_labels