code: def on_shutdown(self, broker):
          
          LOG.debug('%r closing CALL_FUNCTION channel', self)
          self._send(
              mitogen.core.Message(
                  src_id=mitogen.context_id,
                  dst_id=self.remote_id,
                  handle=mitogen.core.SHUTDOWN,
              )
          )
docs: Request the slave gracefully shut itself down.