def calculateOverlap(self, dtl1, dtl2, shift=0):
        """ Calculates total overlap between two lists of pairs of datetime obj:
            [(s1, e1), (s2, e2)] + [(s3, e3), (s4, e4)] -> total overl. in s
            Shift: shifts dt1 by this many seconds (+ for lead, - for lag)
            Assumes that each tuple is in correct order (start, end).
        """
        overl = dt.timedelta()
        for dt1 in dtl1:
            st1 = dt1[0]+shift
            end1 = dt1[1]+shift
            for dt2 in dtl2:
                laststart = max(st1, dt2[0])
                firstend = min(end1, dt2[1])
                if firstend>laststart:
                    overl = firstend - laststart + overl
        # convert from datetime timedelta to seconds
        overl = overl.total_seconds()
        return(overl)