def METHOD_NAME(self):
    # search tree for uimanager
    parent = self.parent
    while isinstance(parent, UIWidget):
        parent = parent.parent
    return parent if isinstance(parent, UIManager) else None