code: def replace(self, source, dest):
          
          for i, broker in enumerate(self.replicas):
              if broker == source:
                  self.replicas[i] = dest
                  return
docs: Replace source broker with destination broker in replica set if found.