code: def create_event(data):
          
          event = riemann_client.riemann_pb2.Event()
          event.host = socket.gethostname()
          event.tags.extend(data.pop('tags', []))
  
          for key, value in data.pop('attributes', {}).items():
              attribute = event.attributes.add()
              attribute.key, attribute.value = key, value
  
          for name, value in data.items():
              if value is not None:
                  setattr(event, name, value)
          return event
docs: Translates a dictionary of event attributes to an Event object
  
          :param dict data: The attributes to be set on the event
          :returns: A protocol buffer ``Event`` object