code: def test_save_and_load(self):
      model = data_set.get_default_access_anomaly_model()
  
      with tempfile.TemporaryDirectory() as tmpdirname:
          model.save(tmpdirname)
          loaded_model = AccessAnomalyModel.load(sc, tmpdirname)
          assert loaded_model is not None
  
          tenant_col = model.tenant_col
          user_col = model.user_col
          user_vec_col = model.user_vec_col
          res_col = model.res_col
          res_vec_col = model.res_vec_col
  
          assert loaded_model.tenant_col == tenant_col
          assert loaded_model.user_col == user_col
          assert loaded_model.user_vec_col == user_vec_col
          assert loaded_model.res_col == res_col
          assert loaded_model.res_vec_col == res_vec_col
  
          intra_test_scored = model.transform(
              data_set.intra_test
          ).orderBy(
              tenant_col,
              user_col,
              res_col,
          )
          intra_test_scored_tag = loaded_model.transform(
              data_set.intra_test
          ).orderBy(
              tenant_col,
              user_col,
              res_col,
          )
  
          assert_frame_equal(
              intra_test_scored.toPandas(),
              intra_test_scored_tag.toPandas(),
          )
  
          inter_test_scored = model.transform(
              data_set.inter_test
          ).orderBy(
              tenant_col,
              user_col,
              res_col,
          )
          inter_test_scored_tag = loaded_model.transform(
              data_set.inter_test
          ).orderBy(
              tenant_col,
              user_col,
              res_col,
          )
  
          assert_frame_equal(
              inter_test_scored.toPandas(),
              inter_test_scored_tag.toPandas(),
          )
  
imports: import os
  import tempfile
  import unittest
  from typing import Dict, Optional, Set, Type, Union
  from pandas.testing import assert_frame_equal
  from pyspark.sql import DataFrame, types, functions
  from synapse.ml.cyber.feature import indexers
  from synapse.ml.cyber import DataFactory
  from synapse.ml.cyber.anomaly.collaborative_filtering import AccessAnomaly, AccessAnomalyModel, AccessAnomalyConfig, ConnectedComponents, ModelNormalizeTransformer, _UserResourceFeatureVectorMapping
  from synapsemltest.cyber.explain_tester import ExplainTester
  from synapsemltest.spark import *
label_desc: Use image node_id 1 for calling the TestAccessAnomaly obj's underlying member method code with example usage: obj.test_save_and_load() without return types