code: def test_adjust_spans():
      text = "A text with  some empty     spaces  that could    bring  not cleany   annotated spans"
      record = ServiceTokenClassificationRecord(
          text=text,
          tokens=text.split(),
          prediction=TokenClassificationAnnotation(
              agent="pred.test",
              entities=[
                  EntitySpan(start=-3, end=2, label="DET"),
                  EntitySpan(start=24, end=36, label="NAME"),
              ],
          ),
          annotation=TokenClassificationAnnotation(
              agent="test",
              entities=[
                  EntitySpan(start=48, end=61, label="VERB"),
                  EntitySpan(start=68, end=100, label="DET"),
              ],
          ),
      )
  
      assert record.prediction.entities == [
          EntitySpan(start=0, end=1, label="DET"),
          EntitySpan(start=28, end=34, label="NAME"),
      ]
  
      assert record.annotation.entities == [
          EntitySpan(start=50, end=60, label="VERB"),
          EntitySpan(start=70, end=85, label="DET"),
      ]
  
imports: import pytest
  from argilla.server.apis.v0.models.token_classification import TokenClassificationAnnotation, TokenClassificationQuery, TokenClassificationRecord
  from argilla.server.commons.models import PredictionStatus
  from argilla.server.daos.backend.search.query_builder import EsQueryBuilder
  from argilla.server.services.tasks.token_classification.model import EntitySpan, ServiceTokenClassificationRecord
  from tests.pydantic_v1 import ValidationError
label_desc: Use image node_id 14 for calling a global function with example usage: test_adjust_spans() without return types