def METHOD_NAME(log, model, user_num=5, item_num=5):
    spark_local_dir = "./logs/tmp/"
    pattern = "model_final.pt"
    del_files_by_pattern(spark_local_dir, pattern)
    model.exact_embeddings_size = False
    model.fit(log=log)
    old_params = [
        param.detach().cpu().numpy() for param in model.model.parameters()
    ]
    old_policy_optimizer_params = model.policy_optimizer.state_dict()[
        "param_groups"
    ][0]
    old_value_optimizer_params = model.value_optimizer.state_dict()[
        "param_groups"
    ][0]
    path = find_file_by_pattern(spark_local_dir, pattern)
    assert path is not None
    new_model = DDPG(user_num=user_num, item_num=item_num)
    new_model.model = ActorDRR(
        user_num=user_num,
        item_num=item_num,
        embedding_dim=8,
        hidden_dim=16,
        memory_size=5,
    )
    new_model.value_net = CriticDRR(
        state_repr_dim=24, action_emb_dim=8, hidden_dim=8
    )
    assert len(old_params) == len(list(new_model.model.parameters()))
    new_model.policy_optimizer = Ranger(new_model.model.parameters())
    new_model.value_optimizer = Ranger(new_model.value_net.parameters())
    new_model._load_model(path)
    for i, parameter in enumerate(new_model.model.parameters()):
        assert np.allclose(
            parameter.detach().cpu().numpy(),
            old_params[i],
            atol=1.0e-3,
        )
    for param_name, parameter in new_model.policy_optimizer.state_dict()[
        "param_groups"
    ][0].items():
        assert np.allclose(
            parameter,
            old_policy_optimizer_params[param_name],
            atol=1.0e-3,
        )
    for param_name, parameter in new_model.value_optimizer.state_dict()[
        "param_groups"
    ][0].items():
        assert np.allclose(
            parameter,
            old_value_optimizer_params[param_name],
            atol=1.0e-3,
        )