class_docstr: This module applies functions to specified feature and metrics.
  
  Extra parameters (kwargs) can be passed to the apply function.
docstr: Apply functions to specified feature and metrics
  
  Each feature/metric combination is treated as a pandas series
  
  :param datastore: input datastore
  :return: updated datastore
  :rtype: dict
docstr_tok: ["Apply","functions","to","specified","feature","and","metrics","Each","feature\/metric","combination","is","treated","as","a","pandas","series",":","param","datastore",":","input","datastore",":","return",":","updated","datastore",":","rtype",":","dict"]
code: def transform(
      self,
      apply_to_data: dict,
      assign_to_data: dict | None = None,
      apply_funcs: list | None = None,
  ):
      """
      Apply functions to specified feature and metrics
  
      Each feature/metric combination is treated as a pandas series
  
      :param datastore: input datastore
      :return: updated datastore
      :rtype: dict
      """
      assert isinstance(apply_to_data, dict)
      if assign_to_data is None:
          assign_to_data = {}
  
      if apply_funcs is not None:
          self.apply_funcs += apply_funcs
  
      if self.msg:
          self.logger.info(self.msg)
  
      features = self.get_features(list(apply_to_data.keys()))
  
      same_key = self.assign_to_key == self.apply_to_key
  
      args = [
          {
              "feature": feature,
              "metrics": self.metrics,
              "apply_to_df": self.get_datastore_object(
                  apply_to_data, feature, dtype=pd.DataFrame
              ),
              "assign_to_df": (
                  None
                  if same_key
                  else self.get_datastore_object(
                      assign_to_data,
                      feature,
                      dtype=pd.DataFrame,
                      default=pd.DataFrame(),
                  )
              ),
              "apply_funcs": self.apply_funcs,
              "same_key": same_key,
          }
          for feature in features
      ]
      result = parallel(apply_func_array, args, mode="kwargs")
      new_metrics = dict(result)
      return new_metrics
  
file_path: popmon/popmon/analysis/apply_func.py
imports: from __future__ import annotations
  import warnings
  import numpy
  import pandas
  from popmon.base import Module
  from popmon.utils import parallel
label_desc: Use image node_id 4 for calling the ApplyFunc obj's underlying member method code with example usage: obj.transform(apply_to_data, assign_to_data, apply_funcs) and returns: new_metrics