code: def test_normalization(self):
      # test when X_t is presented and no scalar
      norm_X_train, norm_X_test = standardizer(
          self.X_train, self.X_test
      )
      assert_allclose(norm_X_train.mean(), 0, atol=0.05)
      assert_allclose(norm_X_train.std(), 1, atol=0.05)
  
      assert_allclose(norm_X_test.mean(), 0, atol=0.05)
      assert_allclose(norm_X_test.std(), 1, atol=0.05)
  
      # test when X_t is not presented and no scalar
      norm_X_train = standardizer(self.X_train)
      assert_allclose(norm_X_train.mean(), 0, atol=0.05)
      assert_allclose(norm_X_train.std(), 1, atol=0.05)
  
      # test when X_t is presented and the scalar is kept
      norm_X_train, norm_X_test, scalar = standardizer(
          self.X_train, self.X_test, keep_scalar=True
      )
  
      assert_allclose(norm_X_train.mean(), 0, atol=0.05)
      assert_allclose(norm_X_train.std(), 1, atol=0.05)
  
      assert_allclose(norm_X_test.mean(), 0, atol=0.05)
      assert_allclose(norm_X_test.std(), 1, atol=0.05)
  
      if not hasattr(scalar, "fit") or not hasattr(scalar, "transform"):
          raise AttributeError(
              "%s is not a detector instance." % (scalar)
          )
  
      # test when X_t is not presented and the scalar is kept
      norm_X_train, scalar = standardizer(
          self.X_train, keep_scalar=True
      )
  
      assert_allclose(norm_X_train.mean(), 0, atol=0.05)
      assert_allclose(norm_X_train.std(), 1, atol=0.05)
  
      if not hasattr(scalar, "fit") or not hasattr(scalar, "transform"):
          raise AttributeError(
              "%s is not a detector instance." % (scalar)
          )
  
      # test shape difference
      with assert_raises(ValueError):
          standardizer(self.X_train, self.X_test_diff)
  
imports: import os
  import sys
  import unittest
  from numpy.testing import assert_allclose
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from sklearn.metrics import precision_score
  from sklearn.utils import check_random_state
  import numpy
  from utils.utility import standardizer
  from utils.utility import get_label_n
  from utils.utility import precision_n_scores
  from utils.utility import argmaxn
  from utils.utility import invert_order
  from utils.utility import check_detector
  from utils.utility import score_to_label
  from utils.utility import list_diff
  from utils.utility import score_to_proba
label_desc: Use image node_id 2 for calling the TestScaler obj's underlying member method code with example usage: obj.test_normalization() without return types