code: def create_dict(event):
          
  
          data = dict()
  
          for descriptor, value in event.ListFields():
              if descriptor.name == 'tags':
                  value = list(value)
              elif descriptor.name == 'attributes':
                  value = dict(((a.key, a.value) for a in value))
              data[descriptor.name] = value
  
          return data
docs: Translates an Event object to a dictionary of event attributes
  
          All attributes are included, so ``create_dict(create_event(input))``
          may return more attributes than were present in the input.
  
          :param event: A protocol buffer ``Event`` object
          :returns: A dictionary of event attributes