def METHOD_NAME(self, table):
    """Hide all submenus of specified table."""
    for row in table.select("TR"):
        if hasattr(row, "submenu"):
            row.submenu.style.display = "none"
            self.METHOD_NAME(row.submenu)