code: def metadata(func):
      
      @functools.wraps(func)
      def decorator(self, *args, **kwargs):
          eitem = func(self, *args, **kwargs)
          metadata = {
              'metadata__gelk_version': self.gelk_version,
              'metadata__gelk_backend_name': self.__class__.__name__,
              'metadata__enriched_on': datetime_utcnow().isoformat()
          }
          eitem.update(metadata)
          return eitem
      return decorator
docs: Add metadata to an item.
  
      Decorator that adds metadata to a given item such as
      the gelk revision used.