def overlap(self, query, subject):
        """Accessory function to check if two ranges overlap"""
        if (self.pt_within(query[0], subject) or self.pt_within(query[1], subject) or 
            self.pt_within(subject[0], query) or self.pt_within(subject[1], query)):
            return True

        return False
def overlap ( self , query , subject ) : if ( self . pt_within ( query [ 0 ] , subject ) or self . pt_within ( query [ 1 ] , subject ) or self . pt_within ( subject [ 0 ] , query ) or self . pt_within ( subject [ 1 ] , query ) ) : return True return False
Accessory function to check if two ranges overlap