input: Write a python function to create a simple todo list RESTful API using Flask and Flask-RESTful.
  assert get_todo_items() == []
  assert post_todo_item('Buy groceries', 'Milk, Eggs, Bread', 1) == {'title': 'Buy groceries', 'description': 'Milk, Eggs, Bread', 'priority': 1}
  assert get_todo_item(0) == {'title': 'Buy groceries', 'description': 'Milk, Eggs, Bread', 'priority': 1}
  assert put_todo_item(0, 'Do laundry', 'Wash and dry clothes', 2) == {'title': 'Do laundry', 'description': 'Wash and dry clothes', 'priority': 2}
  assert delete_todo_item(0) == ''
output: from flask import Flask, request, jsonify
  from flask_restful import Resource, Api
  
  app = Flask(__name__)
  api = Api(app)
  
  todos = []
  
  class TodoList(Resource):
      def get(self):
          return todos, 200
  
      def post(self):
          todo = {
              'title': request.json['title'],
              'description': request.json.get('description', ""),
              'priority': request.json.get('priority', 0)
          }
          todos.append(todo)
          return todo, 201
  
  class TodoItem(Resource):
      def get(self, id):
          if id >= len(todos):
              return "Todo not found", 404
          return todos[id], 200
  
      def put(self, id):
          if id >= len(todos):
              return "Todo not found", 404
          todos[id] = {
              'title': request.json['title'],
              'description': request.json.get('description', ""),
              'priority': request.json.get('priority', 0)
          }
          return todos[id], 200
  
      def delete(self, id):
          if id >= len(todos):
              return "Todo not found", 404
          todos.pop(id)
          return '', 204
  
  api.add_resource(TodoList, '/todos')
  api.add_resource(TodoItem, '/todos/<int:id>')
  
  def get_todo_items():
      with app.test_client() as client:
          response = client.get('/todos')
          return response.json
  
  def post_todo_item(title, description, priority):
      with app.test_client() as client:
          response = client.post('/todos', json={'title': title, 'description': description, 'priority': priority})
          return response.json
  
  def get_todo_item(id):
      with app.test_client() as client:
          response = client.get(f'/todos/{id}')
          return response.json
  
  def put_todo_item(id, title, description, priority):
      with app.test_client() as client:
          response = client.put(f'/todos/{id}', json={'title': title, 'description': description, 'priority': priority})
          return response.json
  
  def delete_todo_item(id):
      with app.test_client() as client:
          response = client.delete(f'/todos/{id}')
          return response.data.decode()
  
  if __name__ == '__main__':
      app.run(debug=True)