input: Write a python function to create a REST API that queries a user from a database and returns the response in JSON format.
  assert create_user_query_api({'username': 'john_doe'}) == {'username': 'john_doe', 'email': 'john@example.com'}
  assert create_user_query_api({'username': 'jane_doe'}) == {'username': 'jane_doe', 'email': 'jane@example.com'}
  assert create_user_query_api({'username': 'non_existing_user'}) == {'error': 'User not found'}
output: from flask import Flask, request, jsonify
  
  app = Flask(__name__)
  
  # Simulating a database with a dictionary
  users_db = {
      'john_doe': {'username': 'john_doe', 'email': 'john@example.com'},
      'jane_doe': {'username': 'jane_doe', 'email': 'jane@example.com'}
  }
  
  @app.route('/query_user', methods=['POST'])
  def create_user_query_api():
      data = request.json
      username = data.get('username')
      
      if username in users_db:
          return jsonify(users_db[username])
      else:
          return jsonify({'error': 'User not found'}), 404
  
  if __name__ == '__main__':
      app.run(debug=True)