input: Write a function to calculate the total cost of a shopping cart. The function should consider the item prices, quantity, shipping cost, and any applicable taxes. The function should take in a list of items, a shipping cost, and a tax rate as parameters, and return the total cost. If the list of items is empty, the function should return the sum of the shipping cost and the tax on the shipping cost.
  assert calculate_total_cost([{"name": "widget", "price": 10, "quantity": 5}, {"name": "thingy", "price": 7, "quantity": 3}, {"name": "doodad", "price": 5, "quantity": 2}], 7.50, 0.095) == 110.0
  assert calculate_total_cost([{"name": "widget", "price": 10, "quantity": 5}, {"name": "thingy", "price": 7, "quantity": 3}], 5.0, 0.08) == 86.2
  assert calculate_total_cost([], 3.0, 0.07) == 3.21
output: def calculate_total_cost(items, shipping_cost, tax_rate):
      if not items:
          return shipping_cost * (1 + tax_rate)
      subtotal = sum(item['price'] * item['quantity'] for item in items)
      total_cost = subtotal + shipping_cost
      total_cost += total_cost * tax_rate
      return total_cost