Zillow listing cards can be sorted by several user-selected criteria, such as price, bedrooms, or address. Implement a function that returns the properties in the requested priority order.
Write sort_properties(properties, criteria), where:
properties is a list of dictionaries. Each dictionary contains numeric fields price, bedrooms, bathrooms, and days_on_zillow, plus a string field address.criteria is a non-empty list of dictionaries. Each criterion has a valid field and an order, either "asc" or "desc". Criteria are listed from highest to lowest priority.def sort_properties(properties, criteria):