code: def replace_all_caps(x:Collection[str]) -> Collection[str]:
      "Replace tokens in ALL CAPS in `x` by their lower version and add `TK_UP` before."
      res = []
      for t in x:
          if t.isupper() and len(t) > 1: res.append(TK_UP); res.append(t.lower())
          else: res.append(t)
      return ref replace_all_caps(x:Collection[str]) -> Collection[str]:
      "Replace tokens in ALL CAPS in `x` by their lower version and add `TK_UP` before."
      res = []
      for t in x:
          if t.isupper() and len(t) > 1: res.append(TK_UP); res.append(t.lower())
          else: res.append(t)
      return res
docs: Replace tokens in ALL CAPS in `x` by their lower version and add `TK_UP` before.