input: Write a python function to calculate tax based on a given price and tax rate.
  assert calculate_tax(100, 0.15) == 15.0
  assert calculate_tax(200, 0.10) == 20.0
  assert calculate_tax(50, 0.20) == 10.0
output: def calculate_tax(price, tax_rate):
      return price * tax_rate