code: def on_event(self, evt, is_final):
          
          for msg in XmlHelper.message_iter(evt):
              for node, error in XmlHelper.security_iter(msg.GetElement('securityData')):
                  if error:
                      self.security_errors.append(error)
                  else:
                      self.on_security_node(node)
  
          if is_final and self.response_type == 'frame':
              index = self.response.pop('security')
              frame = DataFrame(self.response, columns=self.fields, index=index)
              frame.index.name = 'security'
              self.response = frame
docs: this is invoked from in response to COM PumpWaitingMessages - different thread