code: def test_flair_monitoring(monkeypatch, argilla_user: User):
      from flair.data import Sentence
      from flair.models import SequenceTagger
  
      dataset = "test_flair_monitoring"
      model = "flair/ner-english"
  
      delete_ignoring_errors(dataset)
  
      # load tagger
      tagger = SequenceTagger.load(model)
      tagger = monitor(
          tagger,
          dataset=dataset,
          sample_rate=1.0,
          agent=model,
          log_interval=0.5,
      )
  
      # make example sentence
      expected_text = "George Washington went to Washington"
      sentence = Sentence(expected_text)
      # predict NER tags
      tagger.predict(sentence)
  
      sleep(1)  # wait for the consumer time
      detected_labels = sentence.get_labels("ner")
      detected_spans = sentence.get_spans("ner")
      records = load(dataset)
      assert len(records) == 1
  
      record = records[0]
      assert record.text == expected_text
      assert record.tokens == [token.text for token in sentence.tokens]
  
      assert len(record.prediction) == len(detected_labels)
      assert len(record.prediction) == len(detected_spans)
      for (
          (label, start, end, score),
          detected_label,
          detected_span,
      ) in zip(record.prediction, detected_labels, detected_spans):
          assert label == detected_label.value
          assert start == detected_span.start_position
          assert end == detected_span.end_position
          assert score == detected_label.score
  
imports: from time import sleep
  from argilla.client.api import load
  from argilla.monitoring.model_monitor import monitor
  from argilla.server.models import User
  from tests.integration.utils import delete_ignoring_errors
label_desc: Use image node_id 1 for calling a global function with example usage: test_flair_monitoring(monkeypatch, argilla_user) without return types