code: def get_match_names(match):
      
      names = []
      if "paren" in match:
          (match,) = match
          names += get_match_names(match)
      elif "var" in match:
          (setvar,) = match
          if setvar != wildcard:
              names.append(setvar)
      elif "trailer" in match:
          match, trailers = match[0], match[1:]
          for i in range(0, len(trailers), 2):
              op, arg = trailers[i], trailers[i + 1]
              if op == "as":
                  names.append(arg)
          names += get_match_names(match)
      return names
docs: Gets keyword names for the given match.