docs: def enregister(svc, newAddress, password):
      """
      Register a new account and return a Deferred that fires if it worked.
  
      @param svc: a Q2QService
  
      @param newAddress: a Q2QAddress object
  
      @param password: a shared secret (str)
      """
      return svc.connectQ2Q(q2q.Q2QAddress("",""),
                         q2q.Q2QAddress(newAddress.domain, "accounts"),
                         'identity-admin',
                         protocol.ClientFactory.forProtocol(AMP)
                         ).addCallback(
                             AMP.callRemote,
                             AddUser,
                             name=newAddress.resource,
                             password=password
                         ).addErrback(
                             Failure.trap,
                             error.ConnectionDone
                         )