@classmethod
def register_self_callback(cls, cbk, *args, **kwargs):
    """
        Register an extended class level callback `cbk` to be applied when
        reading a frame. The self argument will be passed as first
        variable, then the `System` instance. The modified `System`
        instance is returned as output.

        Class level callbacks are applied to all instances of a class.
        """
    if cls.self_callbacks is None:
        cls.self_callbacks = []
    if (cbk, args, kwargs) not in cls.self_callbacks:
        cls.self_callbacks.append((cbk, args, kwargs))
