code: def test_extract_metrics_for_all_fields(
      records, td_extractor: TextDescriptivesExtractor
  ) -> None:
      expected_fields = [
          key
          for record in records
          for key, value in record.fields.items()
          if value is not None
      ]
      field_metrics = td_extractor._extract_metrics_for_all_fields(
          records, overwrite=False, fields=expected_fields
      )
      assert field_metrics["required-field_n_tokens"].values[0] == 4
      assert all(
          any(
              field == col or field + "_" in col
              for col in field_metrics.columns
          )
          for field in expected_fields
      )
  
imports: from unittest.mock import MagicMock
  import pandas
  import pytest
  from argilla.client.feedback.dataset import FeedbackDataset
  from argilla.client.feedback.integrations.textdescriptives import TextDescriptivesExtractor
  from argilla.client.feedback.schemas.fields import TextField
  from argilla.client.feedback.schemas.metadata import FloatMetadataProperty, IntegerMetadataProperty, TermsMetadataProperty
  from argilla.client.feedback.schemas.questions import TextQuestion
  from argilla.client.feedback.schemas.records import FeedbackRecord
label_desc: Use image node_id 5 for calling a global function with example usage: test_extract_metrics_for_all_fields(records, td_extractor) without return types