code: def test_partitioned_standard_scaler(self):
      ls = StandardScalarScaler(
          "score", "tenant", "new_score", 1.0, use_pandas=False
      )
  
      df = self.create_sample_dataframe()
      model = ls.fit(df)
      new_df = model.transform(df)
  
      assert new_df.count() == df.count()
  
      for tenant in ["t1", "t2", "t3"]:
          new_scores = new_df.filter(
              f.col("tenant") == tenant
          ).toPandas()["new_score"]
  
          assert new_scores is not None
  
          the_mean = new_scores.to_numpy().mean()
          the_std = new_scores.to_numpy().std()
          tenant_scores = [s for _, s in new_scores.items()]
  
          assert the_mean == 0.0
  
          if tenant != "t3":
              assert abs(the_std - 1.0) < 0.0001, str(the_std)
              assert len(tenant_scores) == 2
              assert tenant_scores[0] == -1.0
              assert tenant_scores[1] == 1.0
          else:
              assert the_std == 0.0
              assert len(tenant_scores) == 1
              assert tenant_scores[0] == 0.0
  
file_path: SynapseML/core/src/test/python/synapsemltest/cyber/feature/test_scalers.py
imports: import unittest
  from typing import Type
  from pyspark.sql import functions, types
  from synapse.ml.cyber.feature import LinearScalarScaler, StandardScalarScaler
  from synapsemltest.cyber.explain_tester import ExplainTester
  from synapsemltest.spark import *
label_desc: Use image node_id 5 for calling the TestScalers obj's underlying member method code with example usage: obj.test_partitioned_standard_scaler() without return types