nodes: 0, module; 1, function_definition; 2, function_name:event; 3, parameters; 4, block; 5, identifier:self; 6, identifier:interface_id; 7, identifier:address; 8, identifier:value_key; 9, identifier:value; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, if_statement; 14, return_statement; 15, comment:"""If a device emits some sort event, we will handle it here."""; 16, call; 17, call; 18, attribute; 19, block; 20, True; 21, attribute; 22, argument_list; 23, attribute; 24, argument_list; 25, identifier:self; 26, identifier:eventcallback; 27, expression_statement; 28, identifier:LOG; 29, identifier:debug; 30, binary_operator:"RPCFunctions.event: interface_id = %s, address = %s, value_key = %s, value = %s" % (
              interface_id, address, value_key.upper(), str(value)); 31, subscript; 32, identifier:event; 33, identifier:interface_id; 34, call; 35, identifier:value; 36, call; 37, string:"RPCFunctions.event: interface_id = %s, address = %s, value_key = %s, value = %s"; 38, tuple; 39, subscript; 40, identifier:address; 41, attribute; 42, argument_list; 43, attribute; 44, argument_list; 45, identifier:interface_id; 46, identifier:address; 47, call; 48, call; 49, attribute; 50, subscript; 51, identifier:value_key; 52, identifier:upper; 53, identifier:self; 54, identifier:eventcallback; 55, keyword_argument; 56, keyword_argument; 57, keyword_argument; 58, keyword_argument; 59, attribute; 60, argument_list; 61, identifier:str; 62, argument_list; 63, identifier:self; 64, identifier:devices_all; 65, call; 66, unary_operator; 67, identifier:interface_id; 68, identifier:interface_id; 69, identifier:address; 70, identifier:address; 71, identifier:value_key; 72, call; 73, identifier:value; 74, identifier:value; 75, identifier:value_key; 76, identifier:upper; 77, identifier:value; 78, attribute; 79, argument_list; 80, integer:1; 81, attribute; 82, argument_list; 83, identifier:interface_id; 84, identifier:split; 85, string; 86, identifier:value_key; 87, identifier:upper; 88, string_content:-
code: def event(self, interface_id, address, value_key, value):
          """If a device emits some sort event, we will handle it here."""
          LOG.debug("RPCFunctions.event: interface_id = %s, address = %s, value_key = %s, value = %s" % (
              interface_id, address, value_key.upper(), str(value)))
          self.devices_all[interface_id.split(
              '-')[-1]][address].event(interface_id, value_key.upper(), value)
          if self.eventcallback:
              self.eventcallback(interface_id=interface_id, address=address,
                                 value_key=value_key.upper(), value=value)
          return True