def METHOD_NAME():
    search_space = CategoricalMultiple([1, 2], label='x')
    replay_buffer = ReplayBuffer(20)
    generator = TuningTrajectoryGenerator(search_space, HiddenStatePolicy)
    policy = generator.policy
    for _ in range(20):
        sample = generator.next_sample()
        assert not generator.sample_logits
        reward = sum(search_space.freeze(sample))
        trajectory = generator.send_reward(reward)
        assert np.all(trajectory.policy.hidden_state == np.array([0, 2]))
        assert np.all(trajectory.rew == np.array([0, 3]))
        assert np.all(trajectory.done == np.array([False, True]))
        replay_buffer.update(trajectory)
    policy.update(0, replay_buffer)