def notifyOnConnect(self, notifier):
        """

        @param notifier: callback to call when the Broker connects.
        """
        assert callable(notifier)
        if self.connects is None:
            try:
                notifier()
            except:
                log.err()
        else:
            self.connects.append(notifier)


        @param notifier: callback to call when the Broker connects.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/pb.py