code: def _x_range(data, extra=0.2):
      """Compute the x_range, i.e., the values for which the
      density will be computed. It should be slightly larger than
      the max and min so that the plot actually reaches 0, and
      also has a bit of a tail on both sides.
      """
      try:
          sample_range = np.nanmax(data) - np.nanmin(data)
      except ValueError:
          return []
      if sample_range < 1e-6:
          return [np.nanmin(data), np.nanmax(data)]
      return np.linspace(
          np.nanmin(data) - extra * sample_range,
          np.nanmax(data) + extra * sample_range,
          1000,
      )
  
file_path: joypy/joypy/joyplot.py
imports: import numpy
  from scipy.stats import gaussian_kde
  import scipy.stats
  import warnings
  from pandas import DataFrame, Series
  from pandas.core.dtypes.common import is_number
  from pandas.core.groupby import DataFrameGroupBy
  from matplotlib import pyplot
  from warnings import warn
label_desc: Use image node_id 1 for calling a global function with example usage: _x_range(data, extra) and returns: np, list, list