code: def build_histogram(data_id, col, query, point_filter):
      data = run_query(
          handle_predefined(data_id),
          query,
          global_state.get_context_variables(data_id),
      )
      query, _ = build_group_inputs_filter(data, [point_filter])
      data = run_query(data, query)
      s = data[~pd.isnull(data[col])][col]
      hist_data, hist_labels = np.histogram(s, bins=10)
      hist_labels = list(
          map(lambda x: json_float(x, precision=3), hist_labels[1:])
      )
      axes_builder = build_axes(
          dict(
              data=dict(
                  all=dict(Frequency=hist_data, Bins=hist_labels)
              ),
              min=dict(Frequency=0),
              max=dict(Frequency=max(hist_data)),
          ),
          "Bins",
          dict(type="single", data={}),
          data_id=data_id,
      )
      hist_data = dict(
          data={"all": dict(x=hist_labels, Frequency=hist_data)}
      )
      bars = bar_builder(
          hist_data,
          "Bins",
          ["Frequency"],
          axes_builder,
          chart_builder_passthru,
          modal=True,
      )
      bars.figure["layout"]["xaxis"]["type"] = "category"
      bars.figure["layout"]["title"]["text"] = "{} {} ({} {})".format(
          text("Histogram of"), col, len(s), text("data points")
      )
      return bars
  
file_path: dtale/dtale/dash_application/drilldown_modal.py
imports: import numpy
  import pandas
  from dash.dependencies import Input, Output, State
  import dtale.global_state
  from dtale.charts.utils import AGGS
  from dtale.dash_application.charts import build_chart, bar_builder, build_axes, chart_builder_passthru
  from dtale.dash_application.exceptions import DtalePreventUpdate
  from dtale.dash_application.layout.utils import build_cols, build_option, build_selections
  from dtale.utils import classify_type, dict_merge, find_dtype, is_app_root_defined, json_date, json_float, make_list, get_dtypes
  from dtale.query import build_query, handle_predefined, run_query
  from dtale.charts.utils import MAX_GROUPS, ZAXIS_CHARTS, build_group_inputs_filter, convert_date_val_to_date
  from dtale.translations import text
label_desc: Use image node_id 2 for calling a global function with example usage: build_histogram(data_id, col, query, point_filter) and returns: bars