code: def get_cv_pattern(
      word: str, pprint: bool = False
  ) -> Union[List[Tuple[str, int, str]], str]:
      """
      Return a patterned string representing the consonants
      and vowels of the input word.
  
      >>> word = 'iparras'
      >>> get_cv_pattern(word)
      [('V', 1, 'i'), ('C', 1, 'p'), ('V', 2, 'a'), ('C', 2, 'r'), ('C', 2, 'r'), ('V', 2, 'a'), ('C', 3, 's')]
      >>> get_cv_pattern(word, True)
      'V₁C₁V₂C₂C₂V₂C₃'
      """
  
      subscripts = {
          1: "₁",
          2: "₂",
          3: "₃",
          4: "₄",
          5: "₅",
          6: "₆",
          7: "₇",
          8: "₈",
          9: "₉",
          0: "₀",
      }
  
      pattern = []
      c_count = 1
      v_count = 1
      count = 0
  
      for char in word:
          if char in AKKADIAN["consonants"]:
              cv = "C"
          else:
              cv = "V"
              # remove length:
              if char in AKKADIAN["macron_vowels"]:
                  char = AKKADIAN["short_vowels"][
                      AKKADIAN["macron_vowels"].index(char)
                  ]
              elif char in AKKADIAN["circumflex_vowels"]:
                  char = AKKADIAN["short_vowels"][
                      AKKADIAN["circumflex_vowels"].index(char)
                  ]
          if char not in [x[2] for x in pattern]:
              if cv == "C":
                  count = c_count
                  c_count += 1
              elif cv == "V":
                  count = v_count
                  v_count += 1
              pattern.append((cv, count, char))
          elif char in [x[2] for x in pattern]:
              pattern.append(
                  (
                      cv,
                      next(x[1] for x in pattern if x[2] == char),
                      char,
                  )
              )
      if pprint:
          output = ""
          for item in pattern:
              output += item[0] + subscripts[item[1]]
          return output
      return pattern
  
file_path: cltk/src/cltk/phonology/akk.py
imports: from typing import List, Tuple, Union
label_desc: Use image node_id 1 for calling a global function with example usage: get_cv_pattern(word, pprint) and returns: pattern, output