input: Write a function to create a basic REST API in Python using Flask and Flask-RESTful with JWT authentication. The API should include endpoints for handling items, where one endpoint can retrieve a specific item and another can retrieve a list of all items. If the given item does not exist, return a 404 status code.
  
  
  from flask import Flask, request
  from flask_restful import Resource, Api
  from flask_jwt import JWT, jwt_required
  
  def create_api():
      app = Flask(__name__)
      api = Api(app)
      app.secret_key = 'super-secret-key'
      jwt = JWT(app, authenticate, identity)
  
      items = []
  
      class Item(Resource):
          @jwt_required()
          def get(self, name):
              for item in items:
                  if item['name'] == name:
                      return item
              return {'item': None}, 404
  
          def post(self, name):
              new_item = {'name': name, 'price': 12.00}
              items.append(new_item)
              return new_item, 201
  
      class ItemList(Resource):
          def get(self):
              return {'items': items}
  
      api.add_resource(Item, '/item/<string:name>')
      api.add_resource(ItemList, '/items')
  
      if __name__ == '__main__':
          app.run(port=5000, debug=True)
  
  
  
  assert create_api() is not None
  assert type(create_api()) == type(Flask(__name__))
  assert hasattr(create_api(), 'run')
  assert hasattr(create_api(), 'secret_key')
output: def create_api():
      app = Flask(__name__)
      api = Api(app)
      app.secret_key = 'super-secret-key'
      jwt = JWT(app, authenticate, identity)
  
      items = []
  
      class Item(Resource):
          @jwt_required()
          def get(self, name):
              for item in items:
                  if item['name'] == name:
                      return item
              return {'item': None}, 404
  
          def post(self, name):
              new_item = {'name': name, 'price': 12.00}
              items.append(new_item)
              return new_item, 201
  
      class ItemList(Resource):
          def get(self):
              return {'items': items}
  
      api.add_resource(Item, '/item/<string:name>')
      api.add_resource(ItemList, '/items')
  
      return app