class_docstr: Single class prediction
  
  Attributes:
  -----------
  
  class_label: Union[str, int]
      the predicted class
  
  score: float
      the predicted class score. For human-supervised annotations,
      this probability should be 1.0
class_docstr_tok: ["Single","class","prediction","Attributes",":","--","--","--","--","--","-","class_label",":","Union","[","str",",","int","]","the","predicted","class","score",":","float","the","predicted","class","score",".","For","human-supervised","annotations",",","this","probability","should","be","1.0"]
code: def check_label_length(cls, class_label):
      if isinstance(class_label, str):
          assert 1 <= len(class_label) <= DEFAULT_MAX_KEYWORD_LENGTH, (
              f"Class name '{class_label}' exceeds max length of {DEFAULT_MAX_KEYWORD_LENGTH}"
              if len(class_label) > DEFAULT_MAX_KEYWORD_LENGTH
              else "Class name must not be empty"
          )
      return class_label
  
imports: from datetime import datetime
  from typing import Any, ClassVar, Dict, List, Optional, Union
  from argilla.server.commons.models import PredictionStatus, TaskStatus, TaskType
  from argilla.server.constants import DEFAULT_MAX_KEYWORD_LENGTH
  from argilla.server.helpers import flatten_dict
  from argilla.server.pydantic_v1 import BaseModel, Field, root_validator, validator
  from argilla.server.services.datasets import ServiceBaseDataset
  from argilla.server.services.search.model import ServiceBaseRecordsQuery, ServiceScoreRange
  from argilla.server.services.tasks.commons import ServiceBaseAnnotation, ServiceBaseRecord
label_desc: Use image node_id 1 for calling the ClassPrediction obj's underlying member method code with example usage: obj.check_label_length(cls, class_label) and returns: class_label