code: def read(self):
          
          line = self.trace_file.readline()
          if line == '':
              if self.loop:
                  self._reopen_file()
              else:
                  self.trace_file.close()
                  self.trace_file = None
                  raise DataSourceError()
  
          message = JsonFormatter.deserialize(line)
          timestamp = message.get('timestamp', None)
          if self.realtime and timestamp is not None:
              self._store_timestamp(timestamp)
              self._wait(self.starting_time, self.first_timestamp, timestamp)
          return line + "\x00"
docs: Read a line of data from the input source at a time.