code: def test_to_client(multi_label, expected):
      annotation = TextClassificationAnnotation(
          labels=[ClassPrediction(**{"class": "annot_label"})],
          agent="annot_agent",
      )
      prediction = TextClassificationAnnotation(
          labels=[
              ClassPrediction(**{"class": "label1", "score": 0.5}),
              ClassPrediction(**{"class": "label2", "score": 0.5}),
          ],
          agent="pred_agent",
      )
  
      sdk_record = SdkTextClassificationRecord(
          inputs={"text": "test"},
          annotation=annotation,
          prediction=prediction,
          multi_label=multi_label,
          event_timestamp=datetime(2000, 1, 1),
          metrics={"tokens_length": 42},
      )
  
      record = sdk_record.to_client()
  
      assert record.text == "test"
      assert record.prediction == [("label1", 0.5), ("label2", 0.5)]
      assert record.prediction_agent == "pred_agent"
      assert record.annotation_agent == "annot_agent"
      assert record.annotation == expected
      assert record.metrics == {"tokens_length": 42}
  
file_path: argilla/tests/unit/client/sdk/models/test_text_classification.py
imports: import socket
  from datetime import datetime
  import pytest
  from argilla.client.models import TextClassificationRecord, TokenAttributions
  from argilla.client.sdk.text_classification.models import ClassPrediction, CreationTextClassificationRecord, LabelingRule, LabelingRuleMetricsSummary, TextClassificationAnnotation, TextClassificationBulkData, TextClassificationQuery
  from argilla.client.sdk.text_classification.models import TextClassificationRecord
  from argilla.server.apis.v0.models.text_classification import LabelingRule
  from argilla.server.apis.v0.models.text_classification import LabelingRuleMetricsSummary
  from argilla.server.apis.v0.models.text_classification import TextClassificationBulkRequest
  from argilla.server.apis.v0.models.text_classification import TextClassificationQuery
label_desc: Use image node_id 8 for calling a global function with example usage: test_to_client(multi_label, expected) without return types