code: def pull(
      row,
      suffix_mean: str = "_mean",
      suffix_std: str = "_std",
      cols=None,
  ):
      """Calculate normalized residual (pull) for list of cols
  
      Function can be used by ApplyFunc module.
  
      :param pd.Series row: row to apply pull function to
      :param list cols: list of cols to calculate pull of
      :param str suffix_mean: suffix of mean. mean column = metric + suffix_mean
      :param str suffix_std: suffix of std. std column = metric + suffix_std
      """
  
      rdict = row.to_dict()
      if cols is None or len(cols) == 0:
          # if no columns are given, find columns for which pulls can be calculated.
          # e.g. to calculate x_pull, need to have [x, x_mean, x_std] present. If so, put x in cols.
          indices = list(rdict.keys())
          cols = [
              m
              for m in set(indices)
              if all(
                  r in indices
                  for r in [m + suffix_mean, m + suffix_std]
              )
          ]
  
      x = {
          m: (
              np.nan
              if (
                  any(
                      r not in rdict or pd.isnull(rdict[r])
                      for r in [m, m + suffix_mean, m + suffix_std]
                  )
                  or rdict[m + suffix_std] == 0.0
              )
              else (rdict[m] - rdict[m + suffix_mean])
              / rdict[m + suffix_std]
          )
          for m in cols
      }
  
      return pd.Series(x)
  
imports: import numpy
  import pandas
  from numpy.lib.stride_tricks import as_strided
  from scipy import linalg, stats
  from scipy.stats import linregress, norm
  from popmon.analysis.hist_numpy import check_similar_hists, get_consistent_numpy_2dgrids, get_consistent_numpy_entries, set_2dgrid
  from popmon.hist.hist_utils import COMMON_HIST_TYPES, is_numeric
  from popmon.stats.numpy import probability_distribution_mean_covariance
label_desc: Use image node_id 1 for calling a global function with example usage: pull(row, suffix_mean, suffix_std, cols) and returns: pd