def change_selection_appearance(self, on):
        """Make object appear as selected/deselected.

        Do so by changing which label and background
        is used.

        Parameters
        ==========
        on (boolean)
            indicates which appearance the object will
            assume; if True, the object appears as selected;
            if False, it appears as normal/deselected.
        """
        ### define a prefix according to the value of the
        ### 'on' argument
        prefix = "selected" if on else "normal"

        ### put together attribute names for the text
        ### surface and background using the prefix

        text_attr_name = f"{prefix}_text_surf"
        bg_attr_name = f"{prefix}_bg"

        ### use the attribute names to grab the objects
        ### to be used as text surface and bg

        if self.path is not None:

            self.text_surface = getattr(self, text_attr_name)

        self.bg = getattr(self, bg_attr_name)
Make object appear as selected/deselected.

        Do so by changing which label and background
        is used.

        Parameters
        ==========
        on (boolean)
            indicates which appearance the object will
            assume; if True, the object appears as selected;
            if False, it appears as normal/deselected.
        
nodezator/fileman/pathobj.py