class_docstr: Configured metrics for token classification
class_docstr_tok: ["Configured","metrics","for","token","classification"]
docstr: Helper method to compute IOB tags from entity spans
  
  Args:
      span_utils: Helper class to perform the computation.
      annotation: Contains the spans from which to compute the IOB tags.
  
  Returns:
      The IOB tags or None if ``annotation`` is None.
docstr_tok: ["Helper","method","to","compute","IOB","tags","from","entity","spans","Args",":","span_utils",":","Helper","class","to","perform","the","computation",".","annotation",":","Contains","the","spans","from","which","to","compute","the","IOB","tags",".","Returns",":","The","IOB","tags","or","None","if","``","annotation","``","is","None","."]
code: def _compute_iob_tags(
      span_utils: SpanUtils,
      annotation: Optional[ServiceTokenClassificationAnnotation],
  ) -> Optional[List[str]]:
      """Helper method to compute IOB tags from entity spans
  
      Args:
          span_utils: Helper class to perform the computation.
          annotation: Contains the spans from which to compute the IOB tags.
  
      Returns:
          The IOB tags or None if ``annotation`` is None.
      """
      if annotation is None:
          return None
  
      spans = [
          (ent.label, ent.start, ent.end) for ent in annotation.entities
      ]
      return span_utils.to_tags(spans)
  
imports: from typing import Any, ClassVar, Dict, Iterable, List, Optional, Set, Tuple
  from argilla.server.pydantic_v1 import BaseModel, Field
  from argilla.server.services.metrics import ServiceBaseMetric, ServicePythonMetric
  from argilla.server.services.metrics.models import CommonTasksMetrics
  from argilla.server.services.search.model import ServiceRecordsQuery
  from argilla.server.services.tasks.token_classification.model import EntitySpan, ServiceTokenClassificationAnnotation, ServiceTokenClassificationRecord
  from argilla.utils import SpanUtils
label_desc: Use image node_id 6 for calling the TokenClassificationMetrics obj's underlying member method code with example usage: obj._compute_iob_tags(span_utils, annotation) and returns: span_utils, None