code: def _convert_pt_pad_mode(padding_mode):
      """get the most similar mode of `pad` from ``padding_mode`` of the spatial resampling."""
      if padding_mode is None or padding_mode in (
          "zeros",
          "constant",
          "grid-constant",
      ):
          return PytorchPadMode.CONSTANT
      elif padding_mode in (
          "reflection",
          "reflect",
          "mirror",
          "grid-mirror",
      ):
          return PytorchPadMode.REFLECT
      elif padding_mode in ("wrap", "grid-wrap"):
          return PytorchPadMode.CIRCULAR
      return PytorchPadMode.REPLICATE
  
file_path: MONAI/monai/transforms/croppad/functional.py
imports: from __future__ import annotations
  import warnings
  import numpy
  import torch
  from torch.nn.functional import pad
  from monai.config.type_definitions import NdarrayTensor
  from monai.data.meta_obj import get_track_meta
  from monai.data.meta_tensor import MetaTensor
  from monai.data.utils import to_affine_nd
  from monai.transforms.inverse import TraceableTransform
  from monai.transforms.utils import convert_pad_mode, create_translate
  from monai.utils import PytorchPadMode, convert_to_dst_type, convert_to_numpy, convert_to_tensor, ensure_tuple
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_pt_pad_mode(padding_mode) and returns: PytorchPadMode, PytorchPadMode, PytorchPadMode, PytorchPadMode