def METHOD_NAME(log, model, spark):
    spark_local_dir = spark.conf.get("spark.local.dir")
    pattern = "best_neuromf_1_loss=\\d\\.\\d+.pt.?"
    del_files_by_pattern(spark_local_dir, pattern)
    model.fit(log=log)
    old_params = [
        param.detach().cpu().numpy() for param in model.model.parameters()
    ]
    path = find_file_by_pattern(spark_local_dir, pattern)
    assert path is not None
    new_model = NeuroMF(embedding_mlp_dim=1)
    new_model.model = NMF(3, 4, 2, 2, [2])
    assert len(old_params) == len(list(new_model.model.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,
        )