input: def create_CRUD_REST_API(app: Flask, db: SQLAlchemy) -> None:
      """Create a REST API using Flask and SQLAlchemy that allows users to perform 
      CRUD operations (Create, Read, Update, Delete) on database records. The API 
      should support the following routes:
      1. GET /records - Retrieves all records from the database.
      2. POST /records - Creates a new record in the database.
      3. PUT /records/{id} - Updates an existing record in the database.
      4. DELETE /records/{id} - Deletes a record from the database.
  
      Example:
      >>> app = Flask(__name__)
      >>> app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
      >>> db = SQLAlchemy(app)
      >>> class Record(db.Model):
      ...   id = db.Column(db.Integer, primary_key=True)
      ...   name = db.Column(db.String(120), unique=True)
      >>> db.create_all()
      >>> create_CRUD_REST_API(app, db)
      >>> app.run(debug=True)
      """
      pass
output:     
      @app.route('/records', methods=['GET'])
      def get_records():
          records = Record.query.all()
          return jsonify([{'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({'id': record.id, 'name': record.name})
          return jsonify({'error': '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({'result': 'Record deleted'})
          return jsonify({'error': 'Record not found'}), 404
  