def setup_switches(self):
    """Instantiate and set hide/show switches.

    Only applies to specific widgets with a translate
    method. Those were chosen based on how useful it
    would be to be able to hide/show them at will.
    """
    self.switches = []

    extra_behaviour_for_menu = partial(move_close_to_menubar, self)

    menubar_switch = HideSwitch(
        self.menubar,
        "menubar",
        "midbottom",
        "midtop",
        "up",
        extra_behaviour_for_menu,
    )

    self.switches.extend([menubar_switch])

    ### gather behaviours for updating and drawing
    ### switches

    self.switches_update_methods = [item.update for item in self.switches]

    self.switches_drawing_methods = [item.draw for item in self.switches]
Instantiate and set hide/show switches.

    Only applies to specific widgets with a translate
    method. Those were chosen based on how useful it
    would be to be able to hide/show them at will.
    
nodezator/winman/switch.py