def setNameForLocal(self, name, object):
        """
        Store a special (string) ID for this object.

        This is how you specify a 'base' set of objects that the remote
        protocol can connect to.

        @param name: An ID.
        @param object: The object.
        """
        if isinstance(name, unicode):
            name = name.encode('utf8')

        assert object is not None
        self.localObjects[name] = Local(object)

        Store a special (string) ID for this object.

        This is how you specify a 'base' set of objects that the remote
        protocol can connect to.

        @param name: An ID.
        @param object: The object.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/pb.py