def getRootObject(self):
        """
        Get root object of remote PB server.

        @return: Deferred of the root object.
        """
        if self._broker and not self._broker.disconnected:
            return defer.succeed(self._root)
        d = defer.Deferred()
        self.rootObjectRequests.append(d)
        return d

        Get root object of remote PB server.

        @return: Deferred of the root object.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/pb.py