code: def class_hists(
      data,
      column,
      target,
      bins="auto",
      ax=None,
      legend=True,
      scale_separately=True,
  ):
      """Grouped univariate histograms.
  
      Parameters
      ----------
      data : pandas DataFrame
          Input data to plot.
      column : column specifier
          Column in the data to compute histograms over (must be continuous).
      target : column specifier
          Target column in data, must be categorical.
      bins : string, int or array-like
          Number of bins, 'auto' or bin edges. Passed to np.histogram_bin_edges.
          We always show at least 5 bins for now.
      ax : matplotlib axes
          Axes to plot into.
      legend : boolean, default=True
          Whether to create a legend.
      scale_separately : boolean, default=True
          Whether to scale each class separately.
  
      Examples
      --------
      >>> from dabl.datasets import load_adult
      >>> data = load_adult()
      >>> class_hists(data, "age", "gender", legend=True)
      <Axes: xlabel='age'>
      """
      col_data = data[column].dropna()
  
      if ax is None:
          ax = plt.gca()
      if col_data.nunique() > 10:
          ordinal = False
          # histograms
          bin_edges = np.histogram_bin_edges(col_data, bins=bins)
          if len(bin_edges) > 30:
              bin_edges = np.histogram_bin_edges(col_data, bins=30)
  
          counts = {}
          for name, group in data.groupby(target)[column]:
              this_counts, _ = np.histogram(group, bins=bin_edges)
              counts[name] = this_counts
          counts = pd.DataFrame(counts)
      else:
          ordinal = True
          # ordinal data, count distinct values
          counts = (
              data.groupby(target)[column]
              .value_counts()
              .unstack(target)
          )
      if scale_separately:
          # normalize by maximum
          counts = counts / counts.max()
      bottom = counts.max().max() * 1.1
      for i, name in enumerate(counts.columns):
          if ordinal:
              ax.stairs(
                  counts[name] + bottom * i,
                  range(counts.shape[0] + 1),
                  baseline=bottom * i,
                  edgecolor="k",
                  label=name,
                  fill=True,
              )
          else:
              ax.stairs(
                  counts[name] + bottom * i,
                  bin_edges,
                  baseline=bottom * i,
                  label=name,
                  edgecolor="k",
                  fill=True,
              )
      if legend:
          ax.legend()
      ax.set_yticks(())
      ax.set_xlabel(_shortname(column))
      return ax
  
imports: from warnings import warn
  from functools import reduce
  import itertools
  import numpy
  import pandas
  import matplotlib.pyplot
  from matplotlib.axes import Axes
  from matplotlib.patches import Rectangle, Patch
  from matplotlib.ticker import EngFormatter
  from seaborn.utils import despine
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.metrics import roc_curve
  from sklearn.model_selection import cross_val_score, StratifiedShuffleSplit
  from ..preprocessing import detect_types
  from .._config import get_config
label_desc: Use image node_id 18 for calling a global function with example usage: class_hists(data, column, target, bins, ax, legend, scale_separately) and returns: ax