code: def _text_standardize(text):
      """
      Fixes some issues the spacy tokenizer had on books corpus
      Also handles whitespace standardization
      """
      text = re.sub(
          """(-+|~+|!+|"+|;+|\?+|\++|,+|\)+|\(+|\\+|\/+|\*+|\[+|\]+|}+|{+|\|+|_+)""",
          r" \1 ",
          text,
      )
      text = re.sub("\s*\n\s*", " \n ", text)
      text = re.sub("[^\S\n]+", " ", text)
      return uncurl_quotes(text.strip().lower())
  
file_path: finetune/finetune/base_models/gpt/encoder.py
imports: import re
  import json
  import os
  import warnings
  import codecs
  import numpy
  from ftfy.fixes import uncurl_quotes
  import finetune
  from finetune.encoding.input_encoder import get_spacy, EncodedOutput, BaseEncoder, get_pairs
label_desc: Use image node_id 1 for calling a global function with example usage: _text_standardize(text) and returns: uncurl_quotes