code: def connect_master(self, failed=False):
          '''
          Return a future which will complete when you are connected to a master
          '''
          master, self.pub_channel = yield self.eval_master(self.opts, self.timeout, self.safe, failed)
          yield self._post_master_init(masterf connect_master(self, failed=False):
          '''
          Return a future which will complete when you are connected to a master
          '''
          master, self.pub_channel = yield self.eval_master(self.opts, self.timeout, self.safe, failed)
          yield self._post_master_init(master)
docs: Return a future which will complete when you are connected to a master