def sample_step(self, rewards, alives, block=True):
        """record a step (should be followed by check_done)

        Parameters
        ----------
        block: bool
            if it is True, the function call will block
            if it is False, the caller must call check_done() afterward
                            to check/consume the return message
        """
        package = NDArrayPackage(rewards, alives)
        self.conn.send(["sample", package.info])
        package.send_to(self.conn)

        if block:
            self.check_done()
record a step (should be followed by check_done)

        Parameters
        ----------
        block: bool
            if it is True, the function call will block
            if it is False, the caller must call check_done() afterward
                            to check/consume the return message
        
python/magent/model.py