def last_timestamp(self, event_key=None):
    """Obtain the last timestamp.

    Args:
      event_key: the type key of the sought events (e.g., constants.NAN_KEY). If
      None, includes all event type keys.

    Returns:
      Last (latest) timestamp of all the events of the given type (or all
        event types if event_key is None).
    """
    if event_key is None:
      timestamps = [self._trackers[key].first_timestamp
                    for key in self._trackers]
      return max(timestamp for timestamp in timestamps if timestamp >= 0)
    else:
      return self._trackers[event_key].last_timestamp
Obtain the last timestamp.

    Args:
      event_key: the type key of the sought events (e.g., constants.NAN_KEY). If
      None, includes all event type keys.

    Returns:
      Last (latest) timestamp of all the events of the given type (or all
        event types if event_key is None).