docs: def become_slave(self, broker):
          '''
          Run as part of the handshake.
          @param broker: Remote reference to the broker object
          '''
          self._set_state(BrokerRole.slave)
          self._master = broker
          d = defer.succeed(None)
          if callable(self.on_slave_cb):
              d.addCallback(defer.drop_param, self.on_slave_cb)
  
          d.addCallback(defer.drop_param, self._master.callRemote,
                        'handshake', self, self.agency, self.agency.agency_id,
                        self.is_standalone())
          d.addCallback(defer.inject_param, 1, self.update_state,
                        'reset_locally')
  
          for medium in self.agency.iter_agents():
              d.addCallback(defer.drop_param, self.register_agent, medium)
  
          return d