def METHOD_NAME(log, model, user=0):
    replay_buffer = ReplayBuffer()
    # model.replay_buffer.capacity = 4
    train_matrix, _, _, _ = model._preprocess_log(log)
    model.model = ActorDRR(
        model.user_num,
        model.item_num,
        model.embedding_dim,
        model.hidden_dim,
        model.memory_size,
    )
    model.model.environment.update_env(matrix=train_matrix)
    model.ou_noise = OUNoise(
        model.embedding_dim,
        theta=model.noise_theta,
        max_sigma=model.noise_sigma,
        min_sigma=model.noise_sigma,
        noise_type=model.noise_type,
    )
    user, memory = model.model.environment.reset(user)
    action_emb = model.model(user, memory)
    model.ou_noise.noise_type = "abcd"
    with pytest.raises(ValueError):
        action_emb = model.ou_noise.get_action(action_emb[0], 0)
    model.ou_noise.noise_type = "ou"
    _, action = model.model.get_action(
        action_emb,
        model.model.environment.available_items,
        return_scores=True,
    )
    model.model.environment.memory[to_np(user), to_np(action)] = 1
    user, new_memory, _, _ = model.model.environment.step(
        action, action_emb, replay_buffer
    )
    assert new_memory[user][0][-1] == action