code: def _crop(
      img: torch.Tensor, cropping_shape: List[int]
  ) -> torch.Tensor:
      """Crop out the part of "valid" convolution area."""
      return torch.nn.functional.pad(
          img,
          (
              -cropping_shape[2],
              -cropping_shape[3],
              -cropping_shape[0],
              -cropping_shape[1],
          ),
      )
  
file_path: kornia/kornia/metrics/ssim.py
imports: from typing import List
  import torch
  from torch import nn
  from kornia.filters import filter2d_separable, get_gaussian_kernel1d
  from kornia.filters.filter import _compute_padding
label_desc: Use image node_id 1 for calling a global function with example usage: _crop(img, cropping_shape) and returns: torch