code: def load(
      spark: SQLContext,
      path: str,
      output_format: str = "parquet",
  ) -> "AccessAnomalyModel":
      metadata_df = spark.read.format(output_format).load(
          os.path.join(path, "metadata_df"),
      )
      assert metadata_df.count() == 1
  
      metadata_row = metadata_df.collect()[0]
  
      tenant_col = metadata_row["tenant_col"]
      user_col = metadata_row["user_col"]
      user_vec_col = metadata_row["user_vec_col"]
      res_col = metadata_row["res_col"]
      res_vec_col = metadata_row["res_vec_col"]
      output_col = metadata_row["output_col"]
  
      has_history_access_df = metadata_row["has_history_access_df"]
      has_user2component_mappings_df = metadata_row[
          "has_user2component_mappings_df"
      ]
      has_res2component_mappings_df = metadata_row[
          "has_res2component_mappings_df"
      ]
      has_user_feature_vector_mapping_df = metadata_row[
          "has_user_feature_vector_mapping_df"
      ]
      has_res_feature_vector_mapping_df = metadata_row[
          "has_res_feature_vector_mapping_df"
      ]
  
      history_access_df = (
          spark.read.format(output_format).load(
              os.path.join(path, "history_access_df"),
          )
          if has_history_access_df
          else None
      )
  
      user2component_mappings_df = (
          spark.read.format(output_format).load(
              os.path.join(path, "user2component_mappings_df"),
          )
          if has_user2component_mappings_df
          else None
      )
  
      res2component_mappings_df = (
          spark.read.format(output_format).load(
              os.path.join(path, "res2component_mappings_df"),
          )
          if has_res2component_mappings_df
          else None
      )
  
      user_feature_vector_mapping_df = (
          spark.read.format(output_format).load(
              os.path.join(path, "user_feature_vector_mapping_df"),
          )
          if has_user_feature_vector_mapping_df
          else None
      )
  
      res_feature_vector_mapping_df = (
          spark.read.format(output_format).load(
              os.path.join(path, "res_feature_vector_mapping_df"),
          )
          if has_res_feature_vector_mapping_df
          else None
      )
  
      return AccessAnomalyModel(
          _UserResourceFeatureVectorMapping(
              tenant_col,
              user_col,
              user_vec_col,
              res_col,
              res_vec_col,
              history_access_df,
              user2component_mappings_df,
              res2component_mappings_df,
              user_feature_vector_mapping_df,
              res_feature_vector_mapping_df,
          ),
          output_col,
      )
  
imports: import os
  from typing import List, Optional, Tuple
  from synapse.ml.cyber.anomaly.complement_access import ComplementAccessTransformer
  from synapse.ml.cyber.feature import indexers, scalers
  from synapse.ml.cyber.utils import spark_utils
  import numpy
  from pyspark import SQLContext
  from pyspark.ml import Estimator, Transformer
  from pyspark.ml.param.shared import Param, Params
  from pyspark.ml.recommendation import ALS
  from pyspark.sql import DataFrame, functions, types
label_desc: Use image node_id 4 for calling the AccessAnomalyModel obj's underlying member method code with example usage: obj.load(spark, path, output_format) and returns: AccessAnomalyModel