code: def _pandas_compute_distribution(
      data,
      diagnostic: bool = True,
      spike_factor=10,
      skew_factor=3,
      **kwargs,
  ):
      """Compute distribution metrics.
  
      Args:
          data (DataFrame): The data
          diagnostic (bool): If True, will compute diagnostics used to select "interesting" plots.
          spike_factor (int): The spikey-ness factor used to flag spikey histograms. Defaults to 10.
          skew_factor (int): The skew-ness factor used to flag skewed histograms. Defaults to 3.
          **kwargs: Keyword arguments.
  
      Returns:
          DistributionWidget
      """
      num_data = data.select_dtypes("number")
  
      spike_value = (
          num_data.apply(spikey, axis=0) if diagnostic else None
      )
      skew_value = (
          num_data.apply(skewed, axis=0) if diagnostic else None
      )
  
      return DistributionWidget(
          input_data=data,
          spike_value=spike_value,
          skew_value=skew_value,
          spike_factor=spike_factor,
          skew_factor=skew_factor,
      )
  
imports: from typing import Dict, Any, Optional
  from matplotlib.figure import Figure
  from matplotlib.gridspec import GridSpec
  import seaborn
  import numpy
  from data_describe.config._config import get_option
  from data_describe.metrics.univariate import spikey, skewed
  from data_describe._widget import BaseWidget
  from data_describe.compat import _is_dataframe
  from data_describe.backends import _get_viz_backend, _get_compute_backend
label_desc: Use image node_id 2 for calling a global function with example usage: _pandas_compute_distribution(data, diagnostic, spike_factor, skew_factor) and returns: DistributionWidget