def security_cleanup(self, baseviews, menus):
        viewsmenus = self.get_all_view_menu()
        roles = self.get_all_roles()
        for viewmenu in viewsmenus:
            found = False
            for baseview in baseviews:
                if viewmenu.name == baseview.__class__.__name__:
                    found = True
                    break
            if menus.find(viewmenu.name):
                found = True
            if not found:
                permissions = self.find_permissions_view_menu(viewmenu)
                for permission in permissions:
                    for role in roles:
                        self.del_permission_role(role, permission)
                    self.del_permission_view_menu(permission.permission.name, viewmenu.name)
                self.del_view_menu(viewmenu.name)


    # ---------------------------------------
    # INTERFACE ABSTRACT METHODS
    # ---------------------------------------
    # ------------------------------------
    # PRIMITIVES FOR USERS
    #------------------------------------
Traverse bottom up until data changes significantly
dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/security/manager.py/BaseSecurityManager.security_cleanup--crossover with--dataset/ETHPy150Open blaze/blaze/blaze/compute/core.py/bottom_up_until_type_break