code: def _apply_single(self, txt, meta):
      if isinstance(txt, str):
          return txt.strip()
  
      elif isinstance(txt, list):
          while txt[0].isspace():
              del txt[0]
  
          while txt[-1].isspace():
              del txt[-1]
  
          return txt
  
      else:
          raise TypeError()
  
imports: from dataclasses import dataclass, field
  from typing import Type
  import bidi.algorithm
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.processor.dataprocessor import DataProcessorParams
  from tfaip.util.enum import StrEnum
  from calamari_ocr.ocr.dataset.textprocessors import TextProcessor
label_desc: Use image node_id 1 for calling the StripTextProcessor obj's underlying member method code with example usage: obj._apply_single(txt, meta) and returns: txt, txt