code: def _calculate_annoation_ratio(
      label, n_samples, is_mutli_label, task_type
  ):
      if label is None:
          return format_percent(0)
      if is_mutli_label or task_type == TaskType.TOKEN_CLASSIFICATION:
          annotated_count = _calculate_number_of_annotated_samples(
              label=label,
              is_multi_label=is_mutli_label,
              task_type=task_type,
          )
          return format_percent(annotated_count / n_samples)
      else:
          return format_percent(pd.notna(label).sum() / n_samples)
  
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 1 for calling a global function with example usage: _calculate_annoation_ratio(label, n_samples, is_mutli_label, task_type) and returns: format_percent, format_percent, format_percent