def select_in_range(self):
        """Select paths between first and last selected.

        Works by obtaining the lowest and highest indices
        among selected objects and making it so all paths
        whose indices are inside that range are selected.
        """
        ### get all indices from the values in the selection
        ### state which are True

        indices = [index for index, value in enumerate(self.selection_states) if value]

        ### if the difference between the highest and
        ### lowest indices is higher than one, it means
        ### there are indices between them;
        ### make sure all paths whose indices lie in such
        ### range are selected;

        lowest, highest = min(indices), max(indices)

        if highest - lowest > 1:

            self.selection_states[lowest : highest + 1] = [True] * (
                (highest - lowest) + 1
            )
Select paths between first and last selected.

        Works by obtaining the lowest and highest indices
        among selected objects and making it so all paths
        whose indices are inside that range are selected.
        
nodezator/fileman/dirpanel/extraop.py