code: def _on_state(self, state, client):
          
          def cb(outputs):
              try:
                  distrib, value = outputs.result()
              except CancelledError:
                  logger.info("Client {} cancelled.".format(client.ident))
                  return
              assert np.all(np.isfinite(distrib)), distrib
              action = np.random.choice(len(distrib), p=distrib)
              client.memory.append(TransitionExperience(
                  state, action, reward=None, value=value, prob=distrib[action]))
              self.send_queue.put([client.ident, dumps(action)])
          self.async_predictor.put_task([state], cb)
docs: Launch forward prediction for the new state given by some client.