code: def standardize(
      targets: np.ndarray | Tensor,
      mean: float | np.ndarray | Tensor,
      std: float | np.ndarray | Tensor,
      center_at: float | None = None,
  ) -> np.ndarray | Tensor:
      """Standardize the targets to the z-domain."""
      if isinstance(targets, np.ndarray):
          targets = np.log(targets)
      elif isinstance(targets, Tensor):
          targets = torch.log(targets)
      else:
          raise ValueError(
              f"Targets must be either Tensor or Numpy array. Received {type(targets)}"
          )
      standardized = (targets - mean) / std
      if center_at:
          standardized -= (center_at - mean) / std
      return standardized
  
file_path: anomalib/src/anomalib/post_processing/normalization/cdf.py
imports: from __future__ import annotations
  import numpy
  import torch
  from scipy.stats import norm
  from torch import Tensor
  from torch.distributions import Normal
label_desc: Use image node_id 1 for calling a global function with example usage: standardize(targets, mean, std, center_at) and returns: standardized