code: def test_score_integrity():
      data = {
          "multi_label": False,
          "inputs": {"data": "My cool data"},
          "prediction": {
              "agent": "test",
              "labels": [
                  {"class": "A", "score": 0.3},
                  {"class": "B", "score": 0.9},
              ],
          },
      }
  
      try:
          ServiceTextClassificationRecord.parse_obj(data)
      except ValidationError as e:
          assert "Wrong score distributions" in e.json()
  
      data["multi_label"] = True
      record = ServiceTextClassificationRecord.parse_obj(data)
      assert record is not None
  
      data["multi_label"] = False
      data["prediction"]["labels"] = [
          {"class": "B", "score": 0.9},
      ]
      record = ServiceTextClassificationRecord.parse_obj(data)
      assert record is not None
  
      data["prediction"]["labels"] = [
          {"class": "B", "score": 0.10000000012},
          {"class": "B", "score": 0.90000000002},
      ]
      record = ServiceTextClassificationRecord.parse_obj(data)
      assert record is not None
  
imports: import pytest
  from argilla.server.apis.v0.models.text_classification import TextClassificationAnnotation, TextClassificationQuery, TextClassificationRecord
  from argilla.server.commons.models import PredictionStatus, TaskStatus
  from argilla.server.daos.backend.search.query_builder import EsQueryBuilder
  from argilla.server.services.tasks.text_classification.model import ClassPrediction, ServiceTextClassificationRecord
  from tests.pydantic_v1 import ValidationError
label_desc: Use image node_id 8 for calling a global function with example usage: test_score_integrity() without return types