code: def test_method_field(u1_ml100k, pkf):
      """Ensure the method field is taken into account."""
  
      bsl_options = {"method": "als"}
      algo = BaselineOnly(bsl_options=bsl_options)
      rmse_als = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      bsl_options = {"method": "sgd"}
      algo = BaselineOnly(bsl_options=bsl_options)
      rmse_sgd = cross_validate(algo, u1_ml100k, ["rmse"], pkf)[
          "test_rmse"
      ]
  
      assert rmse_als != rmse_sgd
  
      with pytest.raises(ValueError):
          bsl_options = {"method": "wrong_name"}
          algo = BaselineOnly(bsl_options=bsl_options)
          cross_validate(algo, u1_ml100k, ["rmse"], pkf)["test_rmse"]
  
file_path: Surprise/tests/test_bsl_options.py
imports: import pytest
  from surprise import BaselineOnly
  from surprise.model_selection import cross_validate
label_desc: Use image node_id 1 for calling a global function with example usage: test_method_field(u1_ml100k, pkf) without return types