code: def Load(self):
      
      logger.debug('Loading events from %s', self._file_path)
  
      # GetNext() expects a status argument on TF <= 1.7.
      get_next_args = inspect.getargspec(self._reader.GetNext).args  # pylint: disable=deprecated-method
      # First argument is self
      legacy_get_next = (len(get_next_args) > 1)
  
      while True:
        try:
          if legacy_get_next:
            with tf.compat.v1.errors.raise_exception_on_not_ok_status() as status:
              self._reader.GetNext(status)
          else:
            self._reader.GetNext()
        except (tf.errors.DataLossError, tf.errors.OutOfRangeError) as e:
          logger.debug('Cannot read more events: %s', e)
          # We ignore partial read exceptions, because a record may be truncated.
          # PyRecordReader holds the offset prior to the failed read, so retrying
          # will succeed.
          break
        yield self._reader.record()
      logger.debug('No more events in %s', self._file_path)
docs: Loads all new events from disk as raw serialized proto bytestrings.
  
      Calling Load multiple times in a row will not 'drop' events as long as the
      return value is not iterated over.
  
      Yields:
        All event proto bytestrings in the file that have not been yielded yet.