input: Write a function to improve the efficiency of the given Python code snippet. The function determines the commission rate based on the gross sales amount. If the gross sales are greater than or equal to 10,000, the rate is 0.1. If the gross sales are between 5,000 and 9,999, the rate is 0.07. If the gross sales are less than 5,000, the rate is 0.05. The function should return the appropriate commission rate directly.
  
  assert determine_commission_rate(11000) == 0.1
  assert determine_commission_rate(7500) == 0.07
  assert determine_commission_rate(4000) == 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 5000 <= gross_sales < 10000:
          return 0.07
      else:
          return 0.05