input: Write a function to optimize the given Python code snippet to improve its efficiency. The function should take the gross sales value and return the appropriate commission rate based on the sales amount. If the sales are greater than or equal to $10,000, the function should return 0.1. If the sales are between $5,000 and $10,000 (inclusive of $5,000), it should return 0.07. For sales less than $5,000, it should return 0.05.
  
  assert determine_commission_rate(12000)==0.1
  assert determine_commission_rate(7500)==0.07
  assert determine_commission_rate(4500)==0.05
  assert determine_commission_rate(10000)==0.1
  assert determine_commission_rate(5000)==0.07
output: def determine_commission_rate(gross_sales):
      if gross_sales >= 10000:
          return 0.1
      elif gross_sales >= 5000:
          return 0.07
      else:
          return 0.05