code: def add_time_event(self, time_event):
          
          if isinstance(time_event, time_event_module.TimeEvent):
              self.time_events.append(time_event)
          else:
              raise TypeError("Type Error: received {}, but requires TimeEvent.".
                              format(type(time_event).__name__))
docs: Add a TimeEvent.
  
          :type time_event: :class: `~opencensus.trace.time_event.TimeEvent`
          :param time_event: A TimeEvent object.