input: Write a function to create a Python web application for a car insurance calculator using Flask. The application should have a page where the user can input data such as age, gender, and car model via a POST request, and the server should return a 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': 25, 'gender': 'male', 'car_model': 'Sedan'}) == {'insurance_price': 0.00}
  assert calculate({'age': 35, 'gender': 'female', 'car_model': 'SUV'}) == {'insurance_price': 0.00}
  assert calculate({'age': 50, '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 age < 30:
          insurance_price = 1000.00
      elif age < 50:
          insurance_price = 800.00
      else:
          insurance_price = 600.00
  
      if gender == 'male':
          insurance_price += 100.00
      else:
          insurance_price += 50.00
  
      if car_model == 'SUV':
          insurance_price += 200.00
      elif car_model == 'Truck':
          insurance_price += 300.00
  
      # Return the calculated insurance price in JSON format
      return jsonify({'insurance_price': insurance_price})
  