code: def _get_distribution_values(data):
      mean = data.mean()
      median = data.median()
      x_range = (data.min(), data.max())
      if all(int(x) == x for x in data if x is not None):
          # If the distribution is discrete, we take all the values in it:
          xs = sorted(np.unique(data))
          if len(xs) > 50:
              # If there are too many values, we take only 50, using a constant interval between them:
              xs = list(
                  range(
                      int(xs[0]),
                      int(xs[-1]) + 1,
                      int((xs[-1] - xs[0]) // 50),
                  )
              )
      else:
          xs = sorted(
              np.concatenate(
                  (
                      np.linspace(x_range[0], x_range[1], 50),
                      np.quantile(data, q=np.arange(0.02, 1, 0.02)),
                      [mean, median],
                  )
              )
          )
          ixs = np.searchsorted(sorted(data), xs, side="left")
          xs = [xs[i] for i in range(len(ixs)) if ixs[i] != ixs[i - 1]]
      y_value = get_density(data, xs)
      return y_value, xs
  
file_path: deepchecks/deepchecks/nlp/utils/text_data_plot.py
imports: from typing import List, Optional
  import numpy
  import pandas
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from deepchecks.nlp.task_type import TaskType, TTextLabel
  from deepchecks.nlp.utils.text import break_to_lines_and_trim
  from deepchecks.nlp.utils.text_properties import TEXT_PROPERTIES_DESCRIPTION
  from deepchecks.utils.dataframes import un_numpy
  from deepchecks.utils.distribution.plot import get_density
  from deepchecks.utils.plot import feature_distribution_colors
  from deepchecks.utils.strings import format_percent, get_docs_link
label_desc: Use image node_id 5 for calling a global function with example usage: _get_distribution_values(data) and returns: y_value,  xs