code: def from_client(cls, record: ClientTextClassificationRecord):
      prediction = None
      if record.prediction is not None:
          prediction = TextClassificationAnnotation(
              labels=[
                  ClassPrediction(**{"class": label, "score": score})
                  for label, score in record.prediction
              ],
              agent=record.prediction_agent or MACHINE_NAME,
          )
  
      annotation = None
      if record.annotation is not None:
          annotation_list = (
              record.annotation
              if isinstance(record.annotation, list)
              else [record.annotation]
          )
          annotation = TextClassificationAnnotation(
              labels=[
                  ClassPrediction(**{"class": label})
                  for label in annotation_list
              ],
              agent=record.annotation_agent or MACHINE_NAME,
          )
  
      return cls(
          inputs=record.inputs,
          prediction=prediction,
          annotation=annotation,
          vectors=cls._from_client_vectors(record.vectors),
          multi_label=record.multi_label,
          status=record.status,
          explanation=record.explanation,
          id=record.id,
          metadata=record.metadata,
          event_timestamp=record.event_timestamp,
      )
  
imports: from datetime import datetime
  from typing import Dict, List, Optional, Union
  from argilla.client.models import TextClassificationRecord
  from argilla.client.models import TokenAttributions
  from argilla.client.sdk.commons.models import MACHINE_NAME, BaseAnnotation, BaseRecord, PredictionStatus, ScoreRange, SdkVectorSearch, TaskStatus, UpdateDatasetRequest
  from argilla.pydantic_v1 import BaseModel, Field
label_desc: Use image node_id 1 for calling the CreationTextClassificationRecord obj's underlying member method code with example usage: obj.from_client(cls, record) and returns: cls