code: def test_model_standard_scaling(self):
      tenant_col = AccessAnomalyConfig.default_tenant_col
      user_col = AccessAnomalyConfig.default_user_col
      user_vec_col = AccessAnomalyConfig.default_user_col + "_vec"
      res_col = AccessAnomalyConfig.default_res_col
      res_vec_col = AccessAnomalyConfig.default_res_col + "_vec"
      likelihood_col = AccessAnomalyConfig.default_likelihood_col
  
      df_schema = t.StructType(
          [
              t.StructField(tenant_col, t.StringType(), False),
              t.StructField(user_col, t.StringType(), False),
              t.StructField(res_col, t.StringType(), False),
              t.StructField(likelihood_col, t.DoubleType(), False),
          ],
      )
  
      user_model_schema = t.StructType(
          [
              t.StructField(tenant_col, t.StringType(), False),
              t.StructField(user_col, t.StringType(), False),
              t.StructField(
                  user_vec_col, t.ArrayType(t.DoubleType()), False
              ),
          ],
      )
  
      res_model_schema = t.StructType(
          [
              t.StructField(tenant_col, t.StringType(), False),
              t.StructField(res_col, t.StringType(), False),
              t.StructField(
                  res_vec_col, t.ArrayType(t.DoubleType()), False
              ),
          ],
      )
  
      df = materialized_cache(
          spark.createDataFrame(
              [["0", "roy", "res1", 4.0], ["0", "roy", "res2", 8.0]],
              df_schema,
          ),
      )
  
      user_mapping_df = materialized_cache(
          spark.createDataFrame(
              [["0", "roy", [1.0, 1.0, 0.0, 1.0]]], user_model_schema
          ),
      )
  
      res_mapping_df = materialized_cache(
          spark.createDataFrame(
              [
                  ["0", "res1", [2.0, 2.0, 1.0, 0.0]],
                  ["0", "res2", [4.0, 4.0, 1.0, 0.0]],
              ],
              res_model_schema,
          ),
      )
  
      user_res_feature_vector_mapping_df = (
          UserResourceFeatureVectorMapping(
              tenant_col,
              user_col,
              user_vec_col,
              res_col,
              res_vec_col,
              None,
              None,
              None,
              user_mapping_df,
              res_mapping_df,
          )
      )
  
      assert user_res_feature_vector_mapping_df.check()
  
      model_normalizer = ModelNormalizeTransformer(df, 2)
      fixed_user_res_mapping_df = model_normalizer.transform(
          user_res_feature_vector_mapping_df,
      )
  
      assert fixed_user_res_mapping_df.check()
      assert (
          fixed_user_res_mapping_df.user_feature_vector_mapping_df.count()
          == user_mapping_df.count()
      )
      assert (
          fixed_user_res_mapping_df.res_feature_vector_mapping_df.count()
          == res_mapping_df.count()
      )
  
      fixed_user_mapping_df = (
          fixed_user_res_mapping_df.user_feature_vector_mapping_df
      )
      fixed_res_mapping_df = (
          fixed_user_res_mapping_df.res_feature_vector_mapping_df
      )
  
      assert (
          fixed_user_res_mapping_df.user_feature_vector_mapping_df.filter(
              f.size(f.col(user_vec_col)) == 4,
          ).count()
          == user_mapping_df.count()
      ), f"{fixed_user_mapping_df.filter(f.size(f.col(user_vec_col)) == 4).count()} != {user_mapping_df.count()}"
  
      assert (
          fixed_user_res_mapping_df.res_feature_vector_mapping_df.filter(
              f.size(f.col(res_vec_col)) == 4,
          ).count()
          == res_mapping_df.count()
      ), f"{fixed_res_mapping_df.filter(f.size(f.col(res_vec_col)) == 4).count()} != {res_mapping_df.count()}"
  
      user_vectors = [
          row[user_vec_col]
          for row in fixed_user_res_mapping_df.user_feature_vector_mapping_df.collect()
      ]
      assert len(user_vectors) == 1
      assert user_vectors[0] == [-0.5, -0.5, 3.0, -0.5]
  
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 TestModelNormalizeTransformer obj's underlying member method code with example usage: obj.test_model_standard_scaling() without return types