code: def test_match_similarity_type_from_json_file(header):
      # store parameters in json
      params_str = json.dumps({"similarity_type": "lift"})
      # load parameters in json
      params = json.loads(params_str)
  
      params.update(header)
  
      model = SAR(**params)
  
      train = pd.DataFrame(
          {
              header["col_user"]: [1, 1, 1, 1, 2, 2, 2, 2],
              header["col_item"]: [1, 2, 3, 4, 1, 5, 6, 7],
              header["col_rating"]: [
                  3.0,
                  4.0,
                  5.0,
                  4.0,
                  3.0,
                  2.0,
                  1.0,
                  5.0,
              ],
              header["col_timestamp"]: [
                  1,
                  20,
                  30,
                  400,
                  50,
                  60,
                  70,
                  800,
              ],
          }
      )
  
      # make sure fit still works when similarity type is loaded from a json file
      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 11 for calling a global function with example usage: test_match_similarity_type_from_json_file(header) without return types