code: def strip_annotation_whitespace(annotation):
      text = annotation["text"]
      l_strip = text.lstrip()
      l_pad = len(text) - len(l_strip)
      lr_strip = l_strip.rstrip()
      r_pad = len(l_strip) - len(lr_strip)
  
      annotation["text"] = lr_strip
      annotation["start"] += l_pad
      annotation["end"] -= r_pad
  
      return annotation
  
file_path: finetune/finetune/encoding/sequence_encoder.py
imports: import warnings
  import numpy
  from finetune.encoding.input_encoder import get_spacy
label_desc: Use image node_id 9 for calling a global function with example usage: strip_annotation_whitespace(annotation) and returns: annotation