def account_configs(config):
    """Return the map from account id to their configuration."""

    m = {}
    for bank, account in config.items():
        for name, conf in account.items():
            m[conf["account_id"]] = {i: conf[i] for i in conf if i != "account_id"}
    return m