docs: def _get_variants(name):
      """Return variants of chemical name."""
      names = [name]
      oldname = name
      # Map greek words to unicode characters
      if DOT_GREEK_RE.search(name):
          wordname = name
          while True:
              m = DOT_GREEK_RE.search(wordname)
              if m:
                  wordname = wordname[:m.start(1)-1] + m.group(1) + wordname[m.end(1)+1:]
              else:
                  break
          symbolname = name
          while True:
              m = DOT_GREEK_RE.search(symbolname)
              if m:
                  symbolname = symbolname[:m.start(1)-1] + GREEK_WORDS[m.group(1)] + symbolname[m.end(1)+1:]
              else:
                  break
          names = [wordname, symbolname]
      else:
          while True:
              m = GREEK_RE.search(name)
              if m:
                  name = name[:m.start(2)] + GREEK_WORDS[m.group(2)] + name[m.end(2):]
              else:
                  break
          while True:
              m = UNAMBIGUOUS_GREEK_RE.search(name)
              if m:
                  name = name[:m.start(1)] + GREEK_WORDS[m.group(1)] + name[m.end(1):]
              else:
                  break
          if not name == oldname:
              names.append(name)
      newnames = []
      for name in names:
          # If last word \d+, add variants with hyphen and no space preceding
          if NUM_END_RE.search(name):
              newnames.append(NUM_END_RE.sub('-\g<1>', name))
              newnames.append(NUM_END_RE.sub('\g<1>', name))
          # If last word [A-Za-z]\d* add variants with hyphen preceding.
          if ALPHANUM_END_RE.search(name):
              newnames.append(ALPHANUM_END_RE.sub('-\g<1>', name))
      names.extend(newnames)
      return names