def METHOD_NAME(access_key_id: str) -> str:
    """
    Extract account id from access key id
    Example:
        "ASIAQAAAAAAAGMKEM7X5" => "000000000000"
        "AKIARZPUZDIKGB2VALC4" => "123456789012"
    :param access_key_id: Access key id. Must start with either ASIA or AKIA and has at least 20 characters
    :return: Account ID (as string), 12 digits
    """
    account_id_part = access_key_id[4:12]
    # decode account id part
    try:
        account_id_part_int = int.from_bytes(base64.b32decode(account_id_part), byteorder="big")
    except binascii.Error:
        LOG.warning(
            "Invalid Access Key Id format. Falling back to default id: %s", DEFAULT_AWS_ACCOUNT_ID
        )
        return DEFAULT_AWS_ACCOUNT_ID
    account_id = 2 * (account_id_part_int - ACCOUNT_OFFSET)
    try:
        if AWS_ACCESS_KEY_ALPHABET.index(access_key_id[12]) >= 16:
            account_id += 1
    except ValueError:
        LOG.warning(
            "Char at index 12 not from base32 alphabet. Falling back to default id: %s",
            DEFAULT_AWS_ACCOUNT_ID,
        )
        return DEFAULT_AWS_ACCOUNT_ID
    if account_id < 0 or account_id > 999999999999:
        LOG.warning(
            "Extracted account id not between 000000000000 and 999999999999. Falling back to default id: %s",
            DEFAULT_AWS_ACCOUNT_ID,
        )
        return DEFAULT_AWS_ACCOUNT_ID
    return f"{account_id:012}"