def revert_selection_state(self, path_obj):
        """Revert the selection of the path object.

        That is, if the path is selected, it becomes
        deselected, and vice-versa.

        Parameters
        ==========
        path_obj (fileman.pathobj.PathObject instance)
            path object targeted by the mouse.
        """
        ### reference path
        path = path_obj.path

        ### if it isn't selectable, exit method by returning
        if path not in self.selectable_paths:
            return

        ### otherwise, perform task to make it so the
        ### selection state of the path obj is reversed

        ## retrieve index of path and use it to update
        ## its selection state while referencing the value
        ## of the new selection state

        index = self.selectable_paths.index(path)

        new_selection_state = self.selection_states[index] = not self.selection_states[
            index
        ]

        ## mark the index as the last selected one
        self.last_selected_index = index

        ## change appearance of path object to reflect the
        ## new selection state
        path_obj.change_selection_appearance(new_selection_state)

        ### since the selection changed, make it so the file
        ### manager updates its path selection
        self.fm.update_entry_with_selected()
Revert the selection of the path object.

        That is, if the path is selected, it becomes
        deselected, and vice-versa.

        Parameters
        ==========
        path_obj (fileman.pathobj.PathObject instance)
            path object targeted by the mouse.
        
nodezator/fileman/dirpanel/mouseop.py