code: def _calculate_number_of_annotated_samples(
      label, is_multi_label, task_type
  ):
      if is_multi_label or task_type == TaskType.TOKEN_CLASSIFICATION:
          annotated_count = 0
          for label_data in label:
              annotated_count = (
                  annotated_count + 1
                  if len(label_data) > 0
                  and pd.isna(label_data).sum() == 0
                  else annotated_count
              )
          return annotated_count
      else:
          return pd.notna(label).sum()
  
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 6 for calling a global function with example usage: _calculate_number_of_annotated_samples(label, is_multi_label, task_type) and returns: annotated_count, pd