def METHOD_NAME(nc: SnapshotData, events_list: list):
    for t, tpe, i, state in events_list:
        # Set the state of the event
        if tpe == DeviceType.BusDevice:
            pass
        elif tpe == DeviceType.BranchDevice:
            nc.branch_data.active[i] = state
        elif tpe == DeviceType.GeneratorDevice:
            nc.generator_data.active[i] = state
        elif tpe == DeviceType.StaticGeneratorDevice:
            nc.static_generator_data.static_gen_active[i] = state
        elif tpe == DeviceType.BatteryDevice:
            nc.battery_data.active[i] = state
        elif tpe == DeviceType.ShuntDevice:
            nc.shunt_data.active[i] = state
        elif tpe == DeviceType.LoadDevice:
            nc.load_data.active[i] = state
        else:
            pass
        # compile the grid information
        calculation_islands = nc.split_into_islands()