input: Write a function to create a Python web application for a car insurance calculator. The application should have a page where the user can input the data (e.g age, gender, car model, etc) and should return a calculated insurance price. Define the API endpoint /calculate which accepts a POST request with the user's data and responds with the calculated insurance price in JSON format.
  import flask
  from flask import request, jsonify
  
  # Creating the application app
  app = flask.Flask(__name__)
  
  
  @app.route('/calculate', methods=['POST'])
  def calculate():
      # Get the input data from the user
      data = request.get_json()
  
      age = data['age']
      gender = data['gender']
      car_model = data['car_model']
  
      # Calculate the insurance price
      # ...
      insurance_price = 0.00
  
      # Return the calculated insurance price in JSON format
      return jsonify({'insurance_price': insurance_price})
  	
  app.run(host='0.0.0.0', port=8006)
  
  assert calculate({'age': 30, 'gender': 'male', 'car_model': 'sedan'}) == {'insurance_price': 0.00}
  assert calculate({'age': 25, 'gender': 'female', 'car_model': 'suv'}) == {'insurance_price': 0.00}
  assert calculate({'age': 45, 'gender': 'male', 'car_model': 'truck'}) == {'insurance_price': 0.00}
output: 
  def calculate():
      # Get the input data from the user
      data = request.get_json()
  
      age = data['age']
      gender = data['gender']
      car_model = data['car_model']
  
      # Calculate the insurance price
      if car_model == 'sedan':
          insurance_price = 500.00
      elif car_model == 'suv':
          insurance_price = 700.00
      elif car_model == 'truck':
          insurance_price = 900.00
      else:
          insurance_price = 600.00
  
      if gender == 'female':
          insurance_price *= 0.9
  
      if age < 25:
          insurance_price *= 1.2
      elif age >= 45:
          insurance_price *= 0.8
  
      # Return the calculated insurance price in JSON format
      return jsonify({'insurance_price': insurance_price})
  