input: Write a function to create a basic CRUD API for the BlogPost model using Python/Flask. The API should include endpoints for creating a post, getting all posts, getting a single post, editing a post, and deleting a post.
  
  assert create_blog_crud_api() == 'API endpoints for CRUD operations on BlogPost model created successfully'
  assert create_blog_crud_api().get_posts() == '[{"id": 1, "title": "First Post", "content": "This is the first post content"}, {"id": 2, "title": "Second Post", "content": "This is the second post content"}]'
  assert create_blog_crud_api().get_post(1) == '{"id": 1, "title": "First Post", "content": "This is the first post content"}'
  assert create_blog_crud_api().edit_post(1, {"title": "Updated First Post", "content": "This is the updated first post content"}) == '{"id": 1, "title": "Updated First Post", "content": "This is the updated first post content"}'
  assert create_blog_crud_api().delete_post(1) == '{"message": "Post deleted"}'
output: def create_blog_crud_api():
      from flask import Flask, request, jsonify
      app = Flask(__name__)
  
      blog_posts = []
      post_id_counter = 1
  
      @app.route('/posts', methods=['POST'])
      def create_post():
          nonlocal post_id_counter
          data = request.json
          post = {
              "id": post_id_counter,
              "title": data['title'],
              "content": data['content']
          }
          blog_posts.append(post)
          post_id_counter += 1
          return jsonify(post), 201
  
      @app.route('/posts', methods=['GET'])
      def get_posts():
          return jsonify(blog_posts)
  
      @app.route('/posts/<int:post_id>', methods=['GET'])
      def get_post(post_id):
          post = next((p for p in blog_posts if p['id'] == post_id), None)
          if post:
              return jsonify(post)
          return jsonify({"error": "Post not found"}), 404
  
      @app.route('/posts/<int:post_id>', methods=['PUT'])
      def edit_post(post_id):
          data = request.json
          post = next((p for p in blog_posts if p['id'] == post_id), None)
          if post:
              post['title'] = data.get('title', post['title'])
              post['content'] = data.get('content', post['content'])
              return jsonify(post)
          return jsonify({"error": "Post not found"}), 404
  
      @app.route('/posts/<int:post_id>', methods=['DELETE'])
      def delete_post(post_id):
          global blog_posts
          blog_posts = [p for p in blog_posts if p['id'] != post_id]
          return jsonify({"message": "Post deleted"})
  
      return app