Add a TimeEvent.

        :type time_event: :class: `~opencensus.trace.time_event.TimeEvent`
        :param time_event: A TimeEvent object.

def add_time_event(self, time_event):
        """Add a TimeEvent.

        :type time_event: :class: `~opencensus.trace.time_event.TimeEvent`
        :param time_event: A TimeEvent object.
        """
        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__))