code: def decode_event(self, log_topics, log_data):
          
          # https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#function-selector-and-argument-encoding
  
          # topics[0]: keccak(EVENT_NAME+"("+EVENT_ARGS.map(canonical_type_of).join(",")+")")
          # If the event is declared as anonymous the topics[0] is not generated;
          if not len(log_topics) or log_topics[0] not in self.event_data:
              raise ValueError('Unknown log type')
  
          event_id_ = log_topics[0]
  
          event = self.event_data[event_id_]
  
          # data: abi_serialise(EVENT_NON_INDEXED_ARGS)
          # EVENT_NON_INDEXED_ARGS is the series of EVENT_ARGS that are not
          # indexed, abi_serialise is the ABI serialisation function used for
          # returning a series of typed values from a function.
          unindexed_types = [
              type_
              for type_, indexed in zip(event['types'], event['indexed'])
              if not indexed
          ]
          unindexed_args = decode_abi(unindexed_types, log_data)
  
          # topics[n]: EVENT_INDEXED_ARGS[n - 1]
          # EVENT_INDEXED_ARGS is the series of EVENT_ARGS that are indexed
          indexed_count = 1  # skip topics[0]
  
          result = {}
          for name, type_, indexed in zip(
                  event['names'], event['types'], event['indexed']):
              if indexed:
                  topic_bytes = utils.zpad(
                      utils.encode_int(log_topics[indexed_count]),
                      32,
                  )
                  indexed_count += 1
                  value = decode_single(process_type(type_), topic_bytes)
              else:
                  value = unindexed_args.pop(0)
  
              result[name] = value
          result['_event_type'] = utils.to_string(event['name'])
  
          return result
docs: Return a dictionary representation the log.
  
          Note:
              This function won't work with anonymous events.
  
          Args:
              log_topics (List[bin]): The log's indexed arguments.
              log_data (bin): The encoded non-indexed arguments.