code: def _process_msg(self, client, state, reward, isOver):
          
          # in the first message, only state is valid,
          # reward&isOver should be discarded
          if len(client.memory) > 0:
              client.memory[-1].reward = reward
              if isOver:
                  # should clear client's memory and put to queue
                  self._parse_memory(0, client, True)
              else:
                  if len(client.memory) == LOCAL_TIME_MAX + 1:
                      R = client.memory[-1].value
                      self._parse_memory(R, client, False)
          # feed state and return action
          self._on_state(state, client)
docs: Process a message sent from some client.