input: Write a function that creates 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_post({'title': 'First Post', 'content': 'This is the first post content'})
  assert get_posts() == [{'id': 1, 'title': 'First Post', 'content': 'This is the first post content'}]
  assert get_post(1) == {'id': 1, 'title': 'First Post', 'content': 'This is the first post content'}
  assert edit_post(1, {'title': 'Updated First Post', 'content': 'This is the updated content'}) == {'id': 1, 'title': 'Updated First Post', 'content': 'This is the updated content'}
  assert delete_post(1) == {'message': 'Post deleted'}
  assert get_posts() == []
output: posts = []
  post_id_counter = 1
  
  def create_post(post_data):
      global post_id_counter
      post = {**post_data, 'id': post_id_counter}
      posts.append(post)
      post_id_counter += 1
      return True
  
  def get_posts():
      return posts
  
  def get_post(post_id):
      for post in posts:
          if post['id'] == post_id:
              return post
      return None
  
  def edit_post(post_id, updated_data):
      for post in posts:
          if post['id'] == post_id:
              post.update(updated_data)
              return post
      return None
  
  def delete_post(post_id):
      global posts
      posts = [post for post in posts if post['id'] != post_id]
      return {'message': 'Post deleted'}