input: Write a function to calculate the total cost of a shopping cart by considering the item prices, quantity, shipping cost, and any applicable taxes. The function should take a list of items, a shipping cost, and a tax rate as input and return the total cost after applying taxes and adding the shipping cost. If the list of items is empty, the function should return the shipping cost.
  
  
  def calculate_total_cost(items, shipping_cost, tax_rate):
      total_cost = 0
  
      for item in items:
          total_cost += item['price'] * item['quantity']
  
      total_cost += total_cost * tax_rate
      total_cost += shipping_cost
  
      return total_cost
  
  assert abs(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.90) < 0.01
  assert abs(calculate_total_cost([{"name": "widget", "price": 10, "quantity": 0}, {"name": "thingy", "price": 7, "quantity": 0}, {"name": "doodad", "price": 5, "quantity": 0}], 7.50, 0.095) - 7.50) < 0.01
  assert abs(calculate_total_cost([], 7.50, 0.095) - 7.50) < 0.01
  
output: def calculate_total_cost(items, shipping_cost, tax_rate):
      total_cost = 0
  
      for item in items:
          total_cost += item['price'] * item['quantity']
  
      if items:
          total_cost += total_cost * tax_rate
          total_cost += shipping_cost
      else:
          total_cost = shipping_cost
  
      return total_cost