code: def pmg_serialize(method):
      
  
      @functools.wraps(method)
      def wrapper(*args, **kwargs):
          self = args[0]
          d = method(*args, **kwargs)
          # Add @module and @class
          d["@module"] = self.__class__.__module__
          d["@class"] = self.__class__.__name__
          return d
  
      return wrapper
docs: Decorator for methods that add MSON serializations keys
      to the dictionary. See documentation of MSON for more details