code: def _assert_image_tensor(img: Tensor) -> None:
      if not _is_tensor_a_torch_image(img):
          raise TypeError("Tensor is not a torch image.")
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn.functional import conv2d, grid_sample, interpolate, pad
label_desc: Use image node_id 2 for calling a global function with example usage: _assert_image_tensor(img) without return types