code: def postporcess_score_map(
      distances, out_shape, gaussian_blur=True, mode="bilinear"
  ):
      score_map = (
          F.interpolate(
              distances.unsqueeze_(1),
              size=out_shape,
              mode=mode,
              align_corners=False,
          )
          .squeeze_(1)
          .numpy()
      )
      if gaussian_blur:
          # apply gaussian smoothing on the score map
          for i in range(score_map.shape[0]):
              score_map[i] = gaussian_filter(score_map[i], sigma=4)
  
      return score_map
  
imports: import numpy
  from tqdm import tqdm
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.vision.models.resnet import resnet18, resnet50, wide_resnet50_2
  from scipy.ndimage import gaussian_filter
  from qinspector.cvlib.workspace import register
  from qinspector.uad.utils.utils import cdist, cholesky_inverse, mahalanobis, mahalanobis_einsum, orthogonal, svd_orthogonal
  from qinspector.uad.utils.k_center_greedy import KCenterGreedy
label_desc: Use image node_id 2 for calling a global function with example usage: postporcess_score_map(distances, out_shape, gaussian_blur, mode) and returns: score_map