async def METHOD_NAME(self, role: NodeRole):
    while True:
        try:
            mappings = await self.get_container_mappings(role)
            eps = set(v for v in mappings.values() if v is not None)
            if eps != self._nodes[role]:
                logger.info("New endpoints retrieved: %r", eps)
                events = self._role_to_events.pop(role, [])
                for ev in events:
                    ev.set()
                self._nodes[role] = eps
            await asyncio.sleep(1)
        except SkeinConnectionError:  # pragma: no cover
            logger.warning("Skein application down, process will terminate")
            os.kill(os.getpid(), signal.SIGTERM)
        except (SkeinError, asyncio.CancelledError):  # pragma: no cover
            logger.exception("Error when watching nodes")
            break