def QueueResponse(self, session_id, response, timestamp=None):
    if timestamp is None:
      timestamp = self.frozen_timestamp

    # Status messages cause their requests to be marked as complete. This allows
    # us to quickly enumerate all the completed requests - it is essentially an
    # index for completed requests.
    if response.type == rdf_flows.GrrMessage.Type.STATUS:
      subject = session_id.Add("state")
      queue = self.to_write.setdefault(subject, {})
      queue.setdefault(
          self.FLOW_STATUS_TEMPLATE % response.request_id, []).append((
              response.SerializeToString(), timestamp))

    subject = self.GetFlowResponseSubject(session_id, response.request_id)
    queue = self.to_write.setdefault(subject, {})
    queue.setdefault(
        QueueManager.FLOW_RESPONSE_TEMPLATE % (
            response.request_id, response.response_id),
        []).append((response.SerializeToString(), timestamp))
Queues the message on the flow's state.
dataset/ETHPy150Open google/grr/grr/lib/queue_manager.py/QueueManager.QueueResponse