code: def test__huggingface_format(
      self, record: FeedbackRecord, hf_record: Dict[str, Any]
  ) -> None:
      dataset = FeedbackDataset(
          fields=[
              TextField(name="required-field", required=True),
              TextField(name="optional-field", required=False),
          ],
          questions=[TextQuestion(name="question", required=True)],
      )
      dataset.add_records([record])
  
      hf_dataset = HuggingFaceDatasetMixin._huggingface_format(
          dataset=dataset
      )
      assert all(
          field.name in hf_dataset.features for field in dataset.fields
      )
      assert hf_record == {
          key: value
          for key, value in hf_dataset[0].items()
          if key in [field.name for field in dataset.fields]
      }
  
file_path: argilla/tests/unit/client/feedback/integrations/huggingface/test_dataset.py
imports: from typing import Any, Dict
  import pytest
  from argilla.client.feedback.dataset.local.dataset import FeedbackDataset
  from argilla.client.feedback.integrations.huggingface.dataset import HuggingFaceDatasetMixin
  from argilla.client.feedback.schemas.fields import TextField
  from argilla.client.feedback.schemas.questions import TextQuestion
  from argilla.client.feedback.schemas.records import FeedbackRecord
label_desc: Use image node_id 1 for calling the TestSuiteHuggingFaceDatasetMixin obj's underlying member method code with example usage: obj.test__huggingface_format(record, hf_record) without return types