code: def augment_telugu(sents):
      """
      Add a few sentences with modified punctuation to Telugu_MTG
  
      The Telugu-MTG dataset has punctuation separated from the text in
      almost all cases, which makes the tokenizer not learn how to
      process that correctly.
  
      All of the Telugu sentences end with their sentence final
      punctuation being separated.  Furthermore, all commas are
      separated.  We change that on some subset of the sentences to
      make the tools more generalizable on wild text.
      """
      new_sents = []
      for sentence in sents:
          if not sentence[1].startswith("# text"):
              raise ValueError(
                  "Expected the second line of %s to start with # text"
                  % sentence[0]
              )
          if not sentence[2].startswith("# translit"):
              raise ValueError(
                  "Expected the second line of %s to start with # translit"
                  % sentence[0]
              )
          if sentence[1].endswith(". . .") or sentence[1][-1] not in (
              ".",
              "?",
              "!",
          ):
              continue
          if (
              sentence[1][-1] in (".", "?", "!")
              and sentence[1][-2] != " "
              and sentence[1][-3:] != " .."
              and sentence[1][-4:] != " ..."
          ):
              raise ValueError(
                  "Sentence %s does not end with space-punctuation, which is against our assumptions for the te_mtg treebank.  Please check the augment method to see if it is still needed"
                  % sentence[0]
              )
          if random.random() < 0.1:
              new_sentence = list(sentence)
              new_sentence[1] = (
                  new_sentence[1][:-2] + new_sentence[1][-1]
              )
              new_sentence[2] = (
                  new_sentence[2][:-2] + new_sentence[2][-1]
              )
              new_sentence[-2] = new_sentence[-2] + "|SpaceAfter=No"
              new_sents.append(new_sentence)
          if sentence[1].find(",") > 1 and random.random() < 0.1:
              new_sentence = list(sentence)
              index = sentence[1].find(",")
              new_sentence[1] = (
                  sentence[1][: index - 1] + sentence[1][index:]
              )
              index = sentence[1].find(",")
              new_sentence[2] = (
                  sentence[2][: index - 1] + sentence[2][index:]
              )
              for idx, word in enumerate(new_sentence):
                  if idx < 4:
                      # skip sent_id, text, transliteration, and the first word
                      continue
                  if word.split("\t")[1] == ",":
                      new_sentence[idx - 1] = (
                          new_sentence[idx - 1] + "|SpaceAfter=No"
                      )
                      break
              new_sents.append(new_sentence)
      return sents + new_sents
  
imports: import argparse
  import glob
  import os
  import random
  import re
  import tempfile
  from collections import Counter
  from stanza.models.common.constant import treebank_to_short_name
  import stanza.utils.datasets.common
  from stanza.utils.datasets.common import read_sentences_from_conllu, write_sentences_to_conllu, INT_RE, MWT_RE, MWT_OR_COPY_RE
  import stanza.utils.datasets.tokenization.convert_ml_cochin
  import stanza.utils.datasets.tokenization.convert_my_alt
  import stanza.utils.datasets.tokenization.convert_vi_vlsp
  import stanza.utils.datasets.tokenization.convert_th_best
  import stanza.utils.datasets.tokenization.convert_th_lst20
  import stanza.utils.datasets.tokenization.convert_th_orchid
label_desc: Use image node_id 8 for calling a global function with example usage: augment_telugu(sents) and returns: unknown