code: def hist(sample, options={}, **kwargs):
      """Draw a histogram in the current context figure.
  
      Parameters
      ----------
      sample: numpy.ndarray, 1d
          The sample for which the histogram must be generated.
      options: dict (default: {})
          Options for the scales to be created. If a scale labeled 'counts'
          is required for that mark, options['counts'] contains optional keyword
          arguments for the constructor of the corresponding scale type.
      axes_options: dict (default: {})
          Options for the axes to be created. If an axis labeled 'counts' is
          required for that mark, axes_options['counts'] contains optional
          keyword arguments for the constructor of the corresponding axis type.
      """
      kwargs["sample"] = sample
      scales = kwargs.pop("scales", {})
      if "count" not in scales:
          dimension = _get_attribute_dimension("count", Hist)
          if dimension in _context["scales"]:
              scales["count"] = _context["scales"][dimension]
          else:
              scales["count"] = LinearScale(**options.get("count", {}))
              _context["scales"][dimension] = scales["count"]
      kwargs["scales"] = scales
      return _draw_mark(Hist, options=options, **kwargs)
  
imports: import sys
  from collections import OrderedDict
  from IPython.display import display
  from ipywidgets import Image
  from numpy import arange, issubdtype, array, column_stack, shape
  from .figure import Figure
  from bqscales import Scale, LinearScale, Mercator
  from .axes import Axis
  from .marks import Lines, Scatter, Hist, Bars, OHLC, Pie, Map, Image, Label, HeatMap, GridHeatMap, topo_load, Boxplot, Bins
  from .interacts import BrushIntervalSelector, FastIntervalSelector, BrushSelector, IndexSelector, MultiSelector, LassoSelector
  from traitlets.utils.sentinel import Sentinel
  import functools
label_desc: Use image node_id 27 for calling a global function with example usage: hist(sample, options) and returns: _draw_mark