code: def parse_on_condition(self, node):
          
  
          try:
              test = node.lattrib['test']
          except:
              self.raise_error('<OnCondition> must specify a test.')
              
          event_handler = OnCondition(test)
  
          self.current_regime.add_event_handler(event_handler)
  
          self.current_event_handler = event_handler
          self.process_nested_tags(node)
          self.current_event_handler = None
docs: Parses <OnCondition>
  
          @param node: Node containing the <OnCondition> element
          @type node: xml.etree.Element