Encodes a proxied object to the stream.

        @since: 0.6

def writeProxy(self, obj):
        """
        Encodes a proxied object to the stream.

        @since: 0.6
        """
        proxy = self.context.getProxyForObject(obj)

        self.writeObject(proxy, is_proxy=True)