docs: def _discrete_colorize(categorical, hue, scheme, k, cmap, vmin, vmax):
      """
      Creates a discrete colormap, either using an already-categorical data variable or by bucketing a non-categorical
      ordinal one. If a scheme is provided we compute a distribution for the given data. If one is not provided we
      assume that the input data is categorical.
  
      This code makes extensive use of ``geopandas`` choropleth facilities.
  
      Parameters
      ----------
      categorical : boolean
          Whether or not the input variable is already categorical.
      hue : iterable
          The data column whose entries are being discretely colorized. Note that although top-level plotter ``hue``
          parameters ingest many argument signatures, not just iterables, they are all preprocessed to standardized
          iterables before this method is called.
      scheme : str
          The mapclassify binning scheme to be used for splitting data values (or rather, the the string representation
          thereof).
      k : int
          The number of bins which will be used. This parameter will be ignored if ``categorical`` is True. The default
          value should be 5---this should be set before this method is called.
      cmap : ``matplotlib.cm`` instance
          The `matplotlib` colormap instance which will be used to colorize the geometries. This colormap
          determines the spectrum; our algorithm determines the cuts.
      vmin : float
          A strict floor on the value associated with the "bottom" of the colormap spectrum. Data column entries whose
          value is below this level will all be colored by the same threshold value.
      vmax : float
          A strict cealing on the value associated with the "bottom" of the colormap spectrum. Data column entries whose
          value is above this level will all be colored by the same threshold value.
  
      Returns
      -------
      (cmap, categories, values) : tuple
          A tuple meant for assignment containing the values for various properties set by this method call.
      """
      if not categorical:
          binning = _mapclassify_choro(hue, scheme, k=k)
          values = binning.yb
          binedges = [binning.yb.min()] + binning.bins.tolist()
          categories = ['{0:.2f} - {1:.2f}'.format(binedges[i], binedges[i + 1])
                        for i in range(len(binedges) - 1)]
      else:
          categories = np.unique(hue)
          if len(categories) > 10:
              warnings.warn("Generating a colormap using a categorical column with over 10 individual categories. "
                            "This is not recommended!")
          value_map = {v: i for i, v in enumerate(categories)}
          values = [value_map[d] for d in hue]
      cmap = _norm_cmap(values, cmap, mpl.colors.Normalize, mpl.cm, vmin=vmin, vmax=vmax)
      return cmap, categories, values