code: async def _step(self):
          
          while not self._done() and not self.is_killed():
              try:
                  await self._run()
                  await asyncio.sleep(0)  # relinquish cpu
              except Exception as e:
                  logger.error("Exception running behaviour {}: {}".format(self, e))
                  self.kill(exit_code=e)
          try:
              await self.on_end()
          except Exception as e:
              logger.error("Exception running on_end in behaviour {}: {}".format(self, e))
              self.kill(exit_code=e)
docs: Main loop of the behaviour.
          checks whether behaviour is done or killed,
          ortherwise it calls run() coroutine.