code: def _connsChanged(self, ins: Set[str], outs: Set[str]) -> None:
          
          for o in outs:
              logger.display("{}{} disconnected from {}".format(CONNECTION_PREFIX, self, o),
                             extra={"cli": "IMPORTANT", "tags": ["connected"]})
          for i in ins:
              logger.display("{}{} now connected to {}".format(CONNECTION_PREFIX, self, i),
                             extra={"cli": "IMPORTANT", "tags": ["connected"]})
  
              # remove remotes for same ha when a connection is made
              remote = self.getRemote(i)
              others = [r for r in self.remotes.values()
                        if r.ha == remote.ha and r.name != i]
              for o in others:
                  logger.debug("{} removing other remote".format(self))
                  self.removeRemote(o)
  
          self.onConnsChanged(ins, outs)
docs: A series of operations to perform once a connection count has changed.
  
          - Set f to max number of failures this system can handle.
          - Set status to one of started, started_hungry or starting depending on
              the number of protocol instances.
          - Check protocol instances. See `checkProtocolInstaces()`
  
          :param ins: new nodes connected
          :param outs: nodes no longer connected