code: async def stop(self):
          
          # negate pid so that signals apply to process group
          pgid = -self.process.pid
          try:
              os.kill(pgid, signal.SIGTERM)
              await asyncio.sleep(1)
              os.kill(pgid, signal.SIGKILL)
          except (OSError, ProcessLookupError):
              return
docs: Stop the current task process.
  
          Starts with SIGTERM, gives the process 1 second to terminate, then kills it