input: def generate_rest_api(secret_key: str, jwt_authentication: bool, item_endpoint: str, item_list_endpoint: str) -> None:
      """Generate a basic REST API with authentication and endpoints in Python using Flask.
      The API includes a JWT authentication setup and two endpoints: one for fetching or adding individual items and another for fetching all items.
      >>> generate_rest_api('super-secret-key', True, '/item/<string:name>', '/items')
      """
output:     from flask import Flask, request, jsonify
      from flask_jwt_extended import JWTManager, jwt_required, create_access_token
      from functools import wraps
  
      app = Flask(__name__)
      app.config['SECRET_KEY'] = secret_key
      jwt = JWTManager(app)
  
      items = []
  
      def authenticate(f):
          @wraps(f)
          def decorated(*args, **kwargs):
              if jwt_authentication:
                  auth = request.headers.get('Authorization')
                  if not auth or not auth.startswith('Bearer '):
                      return jsonify({"msg": "Missing or invalid token"}), 401
                  token = auth.split("Bearer ")[1]
                  try:
                      jwt.decode(token, app.config['SECRET_KEY'], algorithms=["HS256"])
                  except:
                      return jsonify({"msg": "Invalid token"}), 401
              return f(*args, **kwargs)
          return decorated
  
      @app.route('/login', methods=['POST'])
      def login():
          if not jwt_authentication:
              return jsonify({"msg": "JWT authentication is disabled"}), 403
          username = request.json.get('username', None)
          password = request.json.get('password', None)
          if not username or not password:
              return jsonify({"msg": "Missing username or password"}), 400
          if username != 'admin' or password != 'password':
              return jsonify({"msg": "Bad username or password"}), 401
          access_token = create_access_token(identity=username)
          return jsonify(access_token=access_token), 200
  
      @app.route(item_endpoint, methods=['GET', 'POST'])
      @authenticate
      def item(name):
          if request.method == 'GET':
              for item in items:
                  if item['name'] == name:
                      return jsonify(item), 200
              return jsonify({"msg": "Item not found"}), 404
          elif request.method == 'POST':
              new_item = request.json
              if not new_item or 'name' not in new_item:
                  return jsonify({"msg": "Invalid item data"}), 400
              for item in items:
                  if item['name'] == new_item['name']:
                      return jsonify({"msg": "Item already exists"}), 409
              items.append(new_item)
              return jsonify(new_item), 201
  
      @app.route(item_list_endpoint, methods=['GET'])
      @authenticate
      def item_list():
          return jsonify(items), 200
  
      if __name__ == '__main__':
          app.run(debug=True)