<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_saas_endurance_space_price(package, size, tier_level):
 """Find the SaaS endurance storage space price for the size and tier :param package: The Storage As A Service product package :param size: The volume size for which a price is desired :param tier_level: The endurance tier for which a price is desired :return: Returns the price for the size and tier, or an error if not found """

    if tier_level != 0.25:
        tier_level = int(tier_level)
    key_name = 'STORAGE_SPACE_FOR_{0}_IOPS_PER_GB'.format(tier_level)
    key_name = key_name.replace(".", "_")
    for item in package['items']:
        if key_name not in item['keyName']:
            continue

        if 'capacityMinimum' not in item or 'capacityMaximum' not in item:
            continue

        capacity_minimum = int(item['capacityMinimum'])
        capacity_maximum = int(item['capacityMaximum'])
        if size < capacity_minimum or size > capacity_maximum:
            continue

        price_id = _find_price_id(item['prices'], 'performance_storage_space')
        if price_id:
            return price_id

    raise ValueError("Could not find price for endurance storage space")