class_docstr: Holds utility methods to work with a tokenized text and entity spans.
  
  Spans must be tuples containing the label (str), start char idx (int), and end char idx (int).
  
  Args:
      text: The text the spans refer to.
      tokens: The tokens of the text.
docstr: Correct span boundaries for leading/trailing white spaces, new lines and tabs.
  
  Args:
      spans: Spans to be corrected.
  
  Returns:
      The corrected spans.
docstr_tok: ["Correct","span","boundaries","for","leading\/trailing","white","spaces",",","new","lines","and","tabs",".","Args",":","spans",":","Spans","to","be","corrected",".","Returns",":","The","corrected","spans","."]
code: def correct(
      self, spans: List[Tuple[str, int, int]]
  ) -> List[Tuple[str, int, int]]:
      """Correct span boundaries for leading/trailing white spaces, new lines and tabs.
  
      Args:
          spans: Spans to be corrected.
  
      Returns:
          The corrected spans.
      """
      corrected_spans = []
      for span in spans:
          start, end = span[1], span[2]
  
          if start < 0:
              start = 0
          if end > len(self.text):
              end = len(self.text)
  
          while (
              start <= len(self.text) and not self.text[start].strip()
          ):
              start += 1
          while not self.text[end - 1].strip():
              end -= 1
  
          corrected_spans.append((span[0], start, end))
  
      return corrected_spans
  
file_path: argilla/src/argilla/utils/span_utils.py
imports: from typing import Dict, List, Optional, Tuple
label_desc: Use image node_id 7 for calling the SpanUtils obj's underlying member method code with example usage: obj.correct(spans) and returns: corrected_spans