input: Write a function to optimize a Python function that determines the commission rate based on the gross sales. The function should return the appropriate commission rate directly upon evaluation, ensuring reduced redundancy in conditional checks.
  
  def determine_commission_rate(gross_sales):
      if gross_sales >= 10000:
          return 0.1
      elif gross_sales >= 5000:
          return 0.07
      else:
          return 0.05
  
  assert determine_commission_rate(15000) == 0.1
  assert determine_commission_rate(7500) == 0.07
  assert determine_commission_rate(4999) == 0.05
  assert determine_commission_rate(0) == 0.05
  assert determine_commission_rate(10000) == 0.1
output: def determine_commission_rate(gross_sales):
      return 0.1 if gross_sales >= 10000 else 0.07 if gross_sales >= 5000 else 0.05