code: def augment_ellipses(sents):
      """
      Replaces a fraction of '...' with '…'
      """
      has_ellipses = False
      has_unicode_ellipses = False
      for sent in sents:
          for line in sent:
              if line.startswith("#"):
                  continue
              pieces = line.split("\t")
              if pieces[1] == "...":
                  has_ellipses = True
              elif pieces[1] == "…":
                  has_unicode_ellipses = True
  
      if has_unicode_ellipses or not has_ellipses:
          return sents
  
      new_sents = []
  
      num_updated = 0
      for sent in sents:
          if random.random() > 0.1:
              new_sents.append(sent)
              continue
          found = False
          new_sent = []
          for line in sent:
              if line.startswith("#"):
                  new_sent.append(line)
              else:
                  pieces = line.split("\t")
                  if pieces[1] == "...":
                      pieces[1] = "…"
                      found = True
                  new_sent.append("\t".join(pieces))
          new_sents.append(new_sent)
          if found:
              num_updated = num_updated + 1
  
      print(
          "Changed %d sentences to use fancy unicode ellipses"
          % num_updated
      )
      return 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 12 for calling a global function with example usage: augment_ellipses(sents) and returns: new_sents, sents