code: def test_crf_model_filename(xseq, yseq, tmpdir):
      path = os.path.join(str(tmpdir), "foo.crfsuite")
      assert not os.path.exists(path)
  
      # model file is created at a specified location
      crf = CRF(model_filename=path)
      crf.fit([xseq], [yseq])
      assert os.path.exists(path)
  
      # it is possible to load the model just by passing a file name
      crf2 = CRF(model_filename=path)
      assert crf2.score([xseq], [yseq]) == 1.0
  
      # crf is picklable
      data = pickle.dumps(crf, protocol=pickle.HIGHEST_PROTOCOL)
      crf3 = pickle.loads(data)
      assert crf3.score([xseq], [yseq]) == 1.0
  
file_path: sklearn-crfsuite/tests/test_crf.py
imports: import os
  import pickle
  import pytest
  from sklearn.model_selection import cross_val_score
  from sklearn_crfsuite import CRF
label_desc: Use image node_id 7 for calling a global function with example usage: test_crf_model_filename(xseq, yseq, tmpdir) without return types