code: def overlaps(self, begin, end=None):
          
          if end is not None:
              # An overlap means that some C exists that is inside both ranges:
              #   begin <= C < end
              # and 
              #   self.begin <= C < self.end
              # See https://stackoverflow.com/questions/3269434/whats-the-most-efficient-way-to-test-two-integer-ranges-for-overlap/3269471#3269471
              return begin < self.end and end > self.begin
          try:
              return self.overlaps(begin.begin, begin.end)
          except:
              return self.contains_point(begin)
docs: Whether the interval overlaps the given point, range or Interval.
          :param begin: beginning point of the range, or the point, or an Interval
          :param end: end point of the range. Optional if not testing ranges.
          :return: True or False
          :rtype: bool