def _remove_overlap_sub(self, also_remove_contiguous: bool) -> bool:
        """
        Called by :meth:`remove_overlap`. Removes the first overlap found.

        Args:
            also_remove_contiguous: treat contiguous (as well as overlapping)
                intervals as worthy of merging?

        Returns:
            bool: ``True`` if an overlap was removed; ``False`` otherwise

        """
        # Returns
        for i in range(len(self.intervals)):
            for j in range(i + 1, len(self.intervals)):
                first = self.intervals[i]
                second = self.intervals[j]
                if also_remove_contiguous:
                    test = first.contiguous(second)
                else:
                    test = first.overlaps(second)
                if test:
                    newint = first.union(second)
                    self.intervals.pop(j)
                    self.intervals.pop(i)  # note that i must be less than j
                    self.intervals.append(newint)
                    return True
        return False
Called by :meth:`remove_overlap`. Removes the first overlap found.

        Args:
            also_remove_contiguous: treat contiguous (as well as overlapping)
                intervals as worthy of merging?

        Returns:
            bool: ``True`` if an overlap was removed; ``False`` otherwise