code: def plot_univariate_density(
      self,
      multiple,
      common_norm,
      common_grid,
      warn_singular,
      fill,
      color,
      legend,
      estimate_kws,
      **plot_kws,
  ):
      # Handle conditional defaults
      if fill is None:
          fill = multiple in ("stack", "fill")
  
      # Preprocess the matplotlib keyword dictionaries
      if fill:
          artist = mpl.collections.PolyCollection
      else:
          artist = mpl.lines.Line2D
      plot_kws = normalize_kwargs(plot_kws, artist)
  
      # Input checking
      _check_argument("multiple", ["layer", "stack", "fill"], multiple)
  
      # Always share the evaluation grid when stacking
      subsets = bool(set(self.variables) - {"x", "y"})
      if subsets and multiple in ("stack", "fill"):
          common_grid = True
  
      # Do the computation
      densities = self._compute_univariate_density(
          self.data_variable,
          common_norm,
          common_grid,
          estimate_kws,
          warn_singular,
      )
  
      # Adjust densities based on the `multiple` rule
      densities, baselines = self._resolve_multiple(densities, multiple)
  
      # Control the interaction with autoscaling by defining sticky_edges
      # i.e. we don't want autoscale margins below the density curve
      sticky_density = (0, 1) if multiple == "fill" else (0, np.inf)
  
      if multiple == "fill":
          # Filled plots should not have any margins
          sticky_support = densities.index.min(), densities.index.max()
      else:
          sticky_support = []
  
      if fill:
          if multiple == "layer":
              default_alpha = 0.25
          else:
              default_alpha = 0.75
      else:
          default_alpha = 1
      alpha = plot_kws.pop(
          "alpha", default_alpha
      )  # TODO make parameter?
  
      # Now iterate through the subsets and draw the densities
      # We go backwards so stacked densities read from top-to-bottom
      for sub_vars, _ in self.iter_data("hue", reverse=True):
          # Extract the support grid and density curve for this level
          key = tuple(sub_vars.items())
          try:
              density = densities[key]
          except KeyError:
              continue
          support = density.index
          fill_from = baselines[key]
  
          ax = self._get_axes(sub_vars)
  
          if "hue" in self.variables:
              sub_color = self._hue_map(sub_vars["hue"])
          else:
              sub_color = color
  
          artist_kws = self._artist_kws(
              plot_kws, fill, False, multiple, sub_color, alpha
          )
  
          # Either plot a curve with observation values on the x axis
          if "x" in self.variables:
              if fill:
                  artist = ax.fill_between(
                      support, fill_from, density, **artist_kws
                  )
  
              else:
                  (artist,) = ax.plot(support, density, **artist_kws)
  
              artist.sticky_edges.x[:] = sticky_support
              artist.sticky_edges.y[:] = sticky_density
  
          # Or plot a curve with observation values on the y axis
          else:
              if fill:
                  artist = ax.fill_betweenx(
                      support, fill_from, density, **artist_kws
                  )
              else:
                  (artist,) = ax.plot(density, support, **artist_kws)
  
              artist.sticky_edges.x[:] = sticky_density
              artist.sticky_edges.y[:] = sticky_support
  
      # --- Finalize the plot ----
  
      ax = self.ax if self.ax is not None else self.facets.axes.flat[0]
      default_x = default_y = ""
      if self.data_variable == "x":
          default_y = "Density"
      if self.data_variable == "y":
          default_x = "Density"
      self._add_axis_labels(ax, default_x, default_y)
  
      if "hue" in self.variables and legend:
          if fill:
              artist = partial(mpl.patches.Patch)
          else:
              artist = partial(mpl.lines.Line2D, [], [])
  
          ax_obj = self.ax if self.ax is not None else self.facets
          self._add_legend(
              ax_obj,
              artist,
              fill,
              False,
              multiple,
              alpha,
              plot_kws,
              {},
          )
  
imports: from numbers import Number
  from functools import partial
  import math
  import textwrap
  import warnings
  import numpy
  import pandas
  import matplotlib
  import matplotlib.pyplot
  import matplotlib.transforms
  from matplotlib.cbook import normalize_kwargs
  from matplotlib.colors import to_rgba
  from matplotlib.collections import LineCollection
  from ._base import VectorPlotter
  from ._statistics import ECDF, Histogram, KDE
  from ._stats.counting import Hist
  from .axisgrid import FacetGrid, _facet_docs
  from .utils import remove_na, _get_transform_functions, _kde_support, _check_argument, _assign_default_kwargs, _default_color
  from .palettes import color_palette
  from .external import husl
  from .external.kde import gaussian_kde
  from ._docstrings import DocstringComponents, _core_docs
label_desc: Use image node_id 14 for calling the _DistributionPlotter obj's underlying member method code with example usage: obj.plot_univariate_density(multiple, common_norm, common_grid, warn_singular, fill, color, legend, estimate_kws) without return types