def _get_currency_exponent(currency: str) -> int:
    """
    Given a currency code, returns the exponent associated with that` currency.
    If the currency code is not found, returns 2 as a default value.

    Args:
        currency (str): The currency code to look up.

    Returns:
        int: The exponent associated with the currency code.
    """
    currencies = _get_currencies_data()

    # get the curr_code column from currencies df as a list
    matches = [entry["exponent"] for entry in currencies if entry["curr_code"] == currency]

    if matches:
        exponent = matches[0]

        # TODO: why does this happen here if we control currency data?
        exponent = int(exponent)

    else:
        # TODO: in what situation are we given a currency code with no match?
        # why return this? E.g. what if someone mispelled a currency code?
        exponent = 2

    return exponent

    Given a currency code, returns the exponent associated with that` currency.
    If the currency code is not found, returns 2 as a default value.

    Args:
        currency (str): The currency code to look up.

    Returns:
        int: The exponent associated with the currency code.
    
great_tables/_formats.py