code: def ReadFlowLogEntries(self,
                           client_id,
                           flow_id,
                           offset,
                           count,
                           with_substring=None):
      
      entries = sorted(
          self.flow_log_entries.get((client_id, flow_id), []),
          key=lambda e: e.timestamp)
  
      if with_substring is not None:
        entries = [i for i in entries if with_substring in i.message]
  
      return entries[offset:offset + count]
docs: Reads flow log entries of a given flow using given query options.