code: def join(self, other, *args, **kwarg):
          
          event = Event(*args, **kwarg)
          if self.intersects(other):
              if self.starts_within(other):
                  event.begin = other.begin
              else:
                  event.begin = self.begin
  
              if self.ends_within(other):
                  event.end = other.end
              else:
                  event.end = self.end
  
              return event
          raise ValueError('Cannot join {} with {}: they don\'t intersect.'.format(self, other))
docs: Create a new event which covers the time range of two intersecting events
  
          All extra parameters are passed to the Event constructor.
  
          Args:
              other: the other event
  
          Returns:
              a new Event instance