input: Write a function to generate a basic REST API with authentication and endpoints in Python using Flask, Flask-RESTful, and Flask-JWT. The API should include JWT-based authentication and two endpoints: one for handling individual items and another for listing all items. If the item already exists in the list, the GET request should return the item; otherwise, it should return a 404 status code. The POST request should add a new item to the list. If no items are present, the list should be empty.
  
  from flask import Flask, request
  from flask_restful import Resource, Api
  from flask_jwt import JWT, jwt_required
  
  app = Flask(name)
  api = Api(app)
  
  # Setup JWT authentication
  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 app.get('/item/test')=={'item': None}, 404
  assert app.post('/item/new')=={'name': 'new', 'price': 12.00}, 201
  assert app.get('/items')=={'items': [{'name': 'new', 'price': 12.00}]}, 200
output: 
  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}
  