def find_item_in_package(cost_key, items, location_group_id, price):
    """Find the item in the packages item list.

    Will return the item cost.

    :param string cost_key: item cost key hourlyRecurringFee or recurringFee.
    :param list items: items list.
    :param int location_group_id: locationGroupId's to get price for.
    :param price: price data.
    """
    item_cost = 0.00
    for item in items:
        # Same item as the price's item
        if item.get('id') == price.get('itemId'):
            # Find the items location specific price.
            for location_price in item.get('prices', []):
                if location_price.get('locationGroupId', 0) == location_group_id:
                    item_cost += float(location_price.get(cost_key))
    return item_cost