code: def test_dataset_with_duplicates(header):
      model = SAR(**header)
      train = pd.DataFrame(
          {
              header["col_user"]: [1, 1, 2, 2, 2],
              header["col_item"]: [1, 2, 1, 2, 2],
              header["col_rating"]: [3.0, 4.0, 3.0, 4.0, 4.0],
          }
      )
      with pytest.raises(ValueError):
          model.fit(train)
  
imports: import json
  import pytest
  import itertools
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from recommenders.utils.constants import DEFAULT_PREDICTION_COL
  from recommenders.models.sar import SAR
label_desc: Use image node_id 12 for calling a global function with example usage: test_dataset_with_duplicates(header) without return types