from abc import abstractmethod
class Component:
def __init__(self, parent):
self.parent = parent
self.parent.add(self)
@abstractmethod
def register(self):
pass
def unregister(self):