input: from typing import List
  
  def generate_rest_api(database_uri: str, record_model: db.Model) -> None:
      """ Generate a REST API using Flask and Flask-SQLAlchemy that allows users to 
      create, read, update, and delete records from a given database. The API should 
      support the following operations:
      
      1. GET /records - Retrieve all records from the database.
      2. POST /records - Create a new record in the database.
      3. PUT /records/<id> - Update an existing record in the database.
      4. DELETE /records/<id> - Delete an existing record from the database.
      
      >>> generate_rest_api('sqlite:////tmp/test.db', Record)
      >>> app.test_client().get('/records')
      '{"records":[]}\n'
      >>> app.test_client().post('/records', json={'name': 'NewRecord'})
      '{"id":1}\n'
      >>> app.test_client().put('/records/1', json={'name': 'UpdatedRecord'})
      '{"message":"Record updated"}\n'
      >>> app.test_client().delete('/records/1')
      '{"message":"Record deleted"}\n'
      """
output:     from flask import Flask, request, jsonify
      from flask_sqlalchemy import SQLAlchemy
  
      app = Flask(__name__)
      app.config['SQLALCHEMY_DATABASE_URI'] = database_uri
      db = SQLAlchemy(app)
  
      class Record(record_model):
          __tablename__ = 'records'
  
      @app.route('/records', methods=['GET'])
      def get_records():
          records = Record.query.all()
          return jsonify({'records': [record.to_dict() for record in records]})
  
      @app.route('/records', methods=['POST'])
      def create_record():
          data = request.get_json()
          new_record = Record(**data)
          db.session.add(new_record)
          db.session.commit()
          return jsonify({'id': new_record.id})
  
      @app.route('/records/<int:id>', methods=['PUT'])
      def update_record(id):
          record = Record.query.get(id)
          if not record:
              return jsonify({'message': 'Record not found'}), 404
          data = request.get_json()
          for key, value in data.items():
              setattr(record, key, value)
          db.session.commit()
          return jsonify({'message': 'Record updated'})
  
      @app.route('/records/<int:id>', methods=['DELETE'])
      def delete_record(id):
          record = Record.query.get(id)
          if not record:
              return jsonify({'message': 'Record not found'}), 404
          db.session.delete(record)
          db.session.commit()
          return jsonify({'message': 'Record deleted'})
  
      if __name__ == '__main__':
          app.run(debug=True)