def get_from_power_tuple(power_tuple, index):
    """
    Extracts an exponent from an exponent tuple that may have been canonicalized
    to be shorter than the expected length, by removing extra zeroes.
    """
    if index >= len(power_tuple):
        return 0
    else:
        return power_tuple[index]