class A:
@register_xnmt_handler
def __init__(self, a):
self.a = a
class B(A):
@register_xnmt_handler
def __init__(self, a, b):
super().__init__(a)
self.b = b
@handle_xnmt_event
def on_f():
self.b = 2 * self.b
# on_f on class B will be called twice, not sure if this is intended
f()