input: Write a python function to simulate a POST request to create a new user using Flask.
  assert create_user({'username': 'john_doe', 'email': 'john@example.com', 'password': '1234'}) == {"message": "User created successfully"}
  assert create_user({'username': 'jane_doe', 'email': 'jane@example.com', 'password': 'abcd'}) == {"message": "User created successfully"}
output: def create_user(user_data):
      from flask import Flask, request, jsonify
  
      app = Flask(__name__)
  
      @app.route('/create_user', methods=['POST'])
      def create_user_endpoint():
          data = request.get_json()
          username = data.get('username')
          email = data.get('email')
          password = data.get('password')
  
          if username and email and password:
              return jsonify({"message": "User created successfully"}), 201
          else:
              return jsonify({"message": "Invalid data"}), 400
  
      # Simulate the POST request to the Flask app
      with app.test_client() as client:
          response = client.post('/create_user', json=user_data)
          return response.get_json()