input: def generate_rest_api_flask(app: Flask, db: SQLAlchemy) -> None:
      """
      Generate a REST API using Flask that allows users to create, read, update, and delete records from a database.
      The API should include the following endpoints:
      - GET /records: Retrieve all records.
      - POST /records: Create a new record.
      - PUT /records/<int:id>: Update an existing record by ID.
      - DELETE /records/<int:id>: Delete an existing record by ID.
      Example:
      >>> app = Flask(name)
      >>> app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
      >>> db = SQLAlchemy(app)
      >>> generate_rest_api_flask(app, db)
      >>> class Record(db.Model):
              id = db.Column(db.Integer, primary_key=True)
              name = db.Column(db.String(120), unique=True)
      >>> db.create_all()
      >>> with app.test_client() as client:
              response = client.post('/records', json={'name': 'TestRecord'})
              assert response.json.get('id') is not None
              response = client.get('/records')
              assert len(response.json.get('records')) == 1
              response = client.put(f'/records/{response.json.get('records')[0]['id']}', json={'name': 'UpdatedRecord'})
              assert response.json.get('message') == 'Record updated'
              response = client.delete(f'/records/{response.json.get('records')[0]['id']}')
              assert response.json.get('message') == 'Record deleted'
      """
output:     @app.route('/records', methods=['GET'])
      def get_records():
          records = Record.query.all()
          return jsonify({'records': [{'id': record.id, 'name': record.name} for record in records]})
  
      @app.route('/records', methods=['POST'])
      def create_record():
          data = request.get_json()
          new_record = Record(name=data['name'])
          db.session.add(new_record)
          db.session.commit()
          return jsonify({'id': new_record.id, 'name': new_record.name}), 201
  
      @app.route('/records/<int:id>', methods=['PUT'])
      def update_record(id):
          data = request.get_json()
          record = Record.query.get(id)
          if record:
              record.name = data['name']
              db.session.commit()
              return jsonify({'message': 'Record updated'})
          return jsonify({'message': 'Record not found'}), 404
  
      @app.route('/records/<int:id>', methods=['DELETE'])
      def delete_record(id):
          record = Record.query.get(id)
          if record:
              db.session.delete(record)
              db.session.commit()
              return jsonify({'message': 'Record deleted'})
          return jsonify({'message': 'Record not found'}), 404