code: def calculate_pps_matrix(data, agg_method):
      _global_checks.global_check_import(
          "ppscore", "depend_matrix with PPS calculation"
      )
      import ppscore as pps
  
      pps_result = pps.matrix(data, sample=None)
      pps_matrix = pps_result[["x", "y", "ppscore"]].pivot(
          columns="x", index="y", values="ppscore"
      )
      pps_matrix.rename_axis(None, axis=1, inplace=True)
      pps_matrix.rename_axis(None, axis=0, inplace=True)
      # aggregate values to make symmetric matrix
      if agg_method == "max":
          pps_matrix = np.maximum(pps_matrix, pps_matrix.transpose())
      if agg_method == "min":
          pps_matrix = np.minimum(pps_matrix, pps_matrix.transpose())
      if agg_method == "mean":
          pps_matrix = (pps_matrix + pps_matrix.transpose()) / 2
      return pps_matrix
  
file_path: DALEX/python/dalex/dalex/aspect/utils.py
imports: import numpy
  import pandas
  import warnings
  from .None import checks
  from ..None import _global_checks
label_desc: Use image node_id 4 for calling a global function with example usage: calculate_pps_matrix(data, agg_method) and returns: pps_matrix