import re


def mapping_account(account_map, keyword):
    """Finding which key of account_map contains the keyword, return the corresponding value.

    Args:
      account_map: A dict of account keywords string (each keyword separated by "|") to account name.
      keyword: A keyword string.
    Return:
      An account name string.
    Raises:
      KeyError: If "DEFAULT" keyword is not in account_map.
    """
    if "DEFAULT" not in account_map:
        raise KeyError("DEFAULT is not in " + account_map.__str__)
    account_name = account_map["DEFAULT"]
    for account_keywords in account_map.keys():
        if account_keywords == "DEFAULT":
            continue
        if re.search(account_keywords, keyword):
            account_name = account_map[account_keywords]
            break
    return account_name