code: def is_partitioned(self) -> bool:
      if self.partition_key is not None or isinstance(
          self.per_group_stats,
          DataFrame,
      ):
          assert self.partition_key is not None and isinstance(
              self.per_group_stats,
              DataFrame,
          )
          res = True
      elif self.partition_key is None or isinstance(
          self.per_group_stats, Dict
      ):
          assert self.partition_key is None and isinstance(
              self.per_group_stats, Dict
          )
          res = False
      else:
          assert (
              False
          ), "unsupported type for per_group_stats: {0}".format(
              type(self.per_group_stats),
          )
  
      return res
  
imports: from abc import ABC, abstractmethod
  from typing import Callable, Dict, List, Optional, Union
  from synapse.ml.cyber.utils.spark_utils import ExplainBuilder, HasSetInputCol, HasSetOutputCol
  from pyspark.ml import Estimator, Transformer
  from pyspark.ml.param.shared import HasInputCol, HasOutputCol, Param, Params
  from pyspark.sql import DataFrame, functions, types
label_desc: Use image node_id 6 for calling the PerPartitionScalarScalerModel obj's underlying member method code with example usage: obj.is_partitioned() and returns: res