class_docstr: Convert source and target examples to uppercase.
  
  This transform uses `unicodedata` to normalize the converted
  uppercase strings as this is needed for some languages (e.g. Greek).
  One issue is that the normalization removes all diacritics and
  accents from the uppercased strings, even though in few occasions some
  diacritics should be kept even in the uppercased form.
docstr: Convert source and target examples to uppercase.
docstr_tok: ["Convert","source","and","target","examples","to","uppercase","."]
code: def apply(self, example, is_train=False, stats=None, **kwargs):
      """Convert source and target examples to uppercase."""
  
      if random.random() > self.upper_corpus_ratio:
          return example
  
      src_str = " ".join(example["src"])
      src_str = "".join(
          c
          for c in unicodedata.normalize("NFD", src_str.upper())
          if unicodedata.category(c) != "Mn"
      )
      example["src"] = src_str.split()
  
      if example["tgt"] is not None:
          tgt_str = " ".join(example["tgt"])
          tgt_str = "".join(
              c
              for c in unicodedata.normalize("NFD", tgt_str.upper())
              if unicodedata.category(c) != "Mn"
          )
          example["tgt"] = tgt_str.split()
  
      return example
  
file_path: OpenNMT-py/onmt/transforms/uppercase.py
imports: from onmt.transforms import register_transform
  from .transform import Transform
  import unicodedata
  import random
label_desc: Use image node_id 4 for calling the UpperCaseTransform obj's underlying member method code with example usage: obj.apply(example, is_train, stats) and returns: example, example