code: def _prepare_log_data(
      self,
      data: List[Tuple[Sentence, Dict[str, Any]]],
  ) -> Dict[str, Any]:
      return dict(
          records=[
              TokenClassificationRecord(
                  text=sentence.to_original_text(),
                  tokens=[token.text for token in sentence.tokens],
                  metadata=meta,
                  prediction_agent=self.agent,
                  event_timestamp=datetime.utcnow(),
                  prediction=[
                      (
                          label.value,
                          span.start_position,
                          span.end_position,
                          label.score,
                      )
                      for label, span in zip(
                          sentence.get_labels(self.__model__.tag_type),
                          sentence.get_spans(self.__model__.tag_type),
                      )
                  ],
              )
              for sentence, meta in data
          ],
          name=self.dataset,
          tags={**(self.tags or {}), "flair_version": _flair_version},
      )
  
file_path: argilla/src/argilla/monitoring/_flair.py
imports: from datetime import datetime
  from typing import Any, Dict, List, Optional, Tuple, Union
  from argilla import TokenClassificationRecord
  from argilla.client.api import Api
  from argilla.monitoring.base import BaseMonitor
  from argilla.monitoring.types import MissingType
label_desc: Use image node_id 1 for calling the FlairMonitor obj's underlying member method code with example usage: obj._prepare_log_data(data) and returns: dict