code: def __init__(self):
      num_tenants = 2
  
      self.training = None
      self.intra_test = None
      self.inter_test = None
  
      for tid in range(num_tenants):
          factory = create_data_factory()
  
          training_pdf = factory.create_clustered_training_data(0.25)
          intra_test_pdf = factory.create_clustered_intra_test_data(
              training_pdf
          )
          inter_test_pdf = factory.create_clustered_inter_test_data()
  
          print(type(training_pdf))
          curr_training = spark.createDataFrame(
              training_pdf
          ).withColumn(
              AccessAnomalyConfig.default_tenant_col,
              f.lit(tid),
          )
  
          curr_intra_test = spark.createDataFrame(
              intra_test_pdf
          ).withColumn(
              AccessAnomalyConfig.default_tenant_col,
              f.lit(tid),
          )
  
          curr_inter_test = spark.createDataFrame(
              inter_test_pdf
          ).withColumn(
              AccessAnomalyConfig.default_tenant_col,
              f.lit(tid),
          )
  
          self.training = (
              self.training.union(curr_training)
              if self.training is not None
              else curr_training
          )
          self.intra_test = (
              self.intra_test.union(curr_intra_test)
              if self.intra_test is not None
              else curr_intra_test
          )
          self.inter_test = (
              self.inter_test.union(curr_inter_test)
              if self.inter_test is not None
              else curr_inter_test
          )
  
      self.training = materialized_cache(self.training)
      self.intra_test = materialized_cache(self.intra_test)
      self.inter_test = materialized_cache(self.inter_test)
  
      assert (
          without_ffa(
              self.training.join(
                  self.intra_test,
                  [
                      AccessAnomalyConfig.default_tenant_col,
                      AccessAnomalyConfig.default_user_col,
                      AccessAnomalyConfig.default_res_col,
                  ],
              ),
          ).count()
          == 0
      ), f"self.training.join is not 0"
  
      self.num_users = (
          self.training.select(
              AccessAnomalyConfig.default_tenant_col,
              AccessAnomalyConfig.default_user_col,
          )
          .distinct()
          .count()
      )
  
      self.num_resources = (
          self.training.select(
              AccessAnomalyConfig.default_tenant_col,
              AccessAnomalyConfig.default_res_col,
          )
          .distinct()
          .count()
      )
  
      self.default_access_anomaly_model = None
      self.per_res_adjust_access_anomaly_model = None
      self.implicit_access_anomaly_model = None
  
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 to create a new Dataset object  with example: obj = Dataset()