code: def find_ent_space_price(package, category, size, tier_level):
      
      if category == 'snapshot':
          category_code = 'storage_snapshot_space'
      elif category == 'replication':
          category_code = 'performance_storage_replication'
      else:  # category == 'endurance'
          category_code = 'performance_storage_space'
  
      level = ENDURANCE_TIERS.get(tier_level)
  
      for item in package['items']:
          if int(item['capacity']) != size:
              continue
          price_id = _find_price_id(item['prices'], category_code, 'STORAGE_TIER_LEVEL', level)
          if price_id:
              return price_id
  
      raise ValueError("Could not find price for %s storage space" % category)
docs: Find the space price for the given category, size, and tier
  
      :param package: The Enterprise (Endurance) product package
      :param category: The category of space (endurance, replication, snapshot)
      :param size: The size for which a price is desired
      :param tier_level: The endurance tier for which a price is desired
      :return: Returns the matching price, or an error if not found