code: def match_rating_codex(s):
      _check_type(s)
  
      # we ignore spaces
      s = s.upper().replace(" ", "")
      # any remaining non-alphabetic characters are invalid
      if not s.isalpha():
          raise ValueError("string must be alphabetic")
  
      codex = []
  
      prev = None
      first = True
      for c in s:
          # starting character
          # or consonant not preceded by same consonant
          if first or (c not in "AEIOU" and c != prev):
              codex.append(c)
  
          prev = c
          first = False
  
      # just use first/last 3
      if len(codex) > 6:
          return "".join(codex[:3] + codex[-3:])
      else:
          return "".join(codex)
  
file_path: jellyfish/python/jellyfish/_jellyfish.py
imports: import unicodedata
  from collections import defaultdict
  from itertools import zip_longest
  import warnings
label_desc: Use image node_id 11 for calling a global function with example usage: match_rating_codex(s) and returns: str, str