code: def test_name_field(u1_ml100k, pkf):
      """Ensure the name field is taken into account."""
  
      sim_options = {"name": "cosine"}
      algo = KNNBasic(sim_options=sim_options)
      rmse_cosine = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      sim_options = {"name": "msd"}
      algo = KNNBasic(sim_options=sim_options)
      rmse_msd = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      sim_options = {"name": "pearson"}
      algo = KNNBasic(sim_options=sim_options)
      rmse_pearson = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      sim_options = {"name": "pearson_baseline"}
      bsl_options = {"n_epochs": 1}
      algo = KNNBasic(sim_options=sim_options, bsl_options=bsl_options)
      rmse_pearson_bsl = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      for rmse_a, rmse_b in combinations(
          (rmse_cosine, rmse_msd, rmse_pearson, rmse_pearson_bsl), 2
      ):
          assert rmse_a != rmse_b
  
      with pytest.raises(NameError):
          sim_options = {"name": "wrong_name"}
          algo = KNNBasic(sim_options=sim_options)
          cross_validate(algo, u1_ml100k, ["rmse"], pkf)
  
imports: from itertools import combinations
  import pytest
  from surprise import KNNBaseline, KNNBasic, KNNWithMeans
  from surprise.model_selection import cross_validate
label_desc: Use image node_id 1 for calling a global function with example usage: test_name_field(u1_ml100k, pkf) without return types