code: def properties_operator(cls, name):
      
  
      def wrapper(self, *args, **kwargs):
          """Perform operation and cast to container class"""
          output = getattr(super(cls, self), name)(*args, **kwargs)
          return cls(output)
  
      wrapped = getattr(cls, name)
      wrapper.__name__ = wrapped.__name__
      wrapper.__doc__ = wrapped.__doc__
      return wrapper
docs: Wraps a container operator to ensure container class is maintained