def localObjectForID(self, luid):
        """
        Get a local object for a locally unique ID.

        @return: An object previously stored with L{registerReference} or
            L{None} if there is no object which corresponds to the given
            identifier.
        """
        if isinstance(luid, unicode):
            luid = luid.encode('utf8')

        lob = self.localObjects.get(luid)
        if lob is None:
            return
        return lob.object

        Get a local object for a locally unique ID.

        @return: An object previously stored with L{registerReference} or
            L{None} if there is no object which corresponds to the given
            identifier.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/pb.py