code: def _assert_grid_transform_inputs(
      img: Tensor,
      matrix: Optional[List[float]],
      interpolation: str,
      fill: Optional[Union[int, float, List[float]]],
      supported_interpolation_modes: List[str],
      coeffs: Optional[List[float]] = None,
  ) -> None:
      if not (isinstance(img, torch.Tensor)):
          raise TypeError("Input img should be Tensor")
  
      _assert_image_tensor(img)
  
      if matrix is not None and not isinstance(matrix, list):
          raise TypeError("Argument matrix should be a list")
  
      if matrix is not None and len(matrix) != 6:
          raise ValueError("Argument matrix should have 6 float values")
  
      if coeffs is not None and len(coeffs) != 8:
          raise ValueError("Argument coeffs should have 8 float values")
  
      if fill is not None and not isinstance(
          fill, (int, float, tuple, list)
      ):
          warnings.warn(
              "Argument fill should be either int, float, tuple or list"
          )
  
      # Check fill
      num_channels = get_dimensions(img)[0]
      if (
          fill is not None
          and isinstance(fill, (tuple, list))
          and len(fill) > 1
          and len(fill) != num_channels
      ):
          msg = (
              "The number of elements in 'fill' cannot broadcast to match the number of "
              "channels of the image ({} != {})"
          )
          raise ValueError(msg.format(len(fill), num_channels))
  
      if interpolation not in supported_interpolation_modes:
          raise ValueError(
              f"Interpolation mode '{interpolation}' is unsupported with Tensor input"
          )
  
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 25 for calling a global function with example usage: _assert_grid_transform_inputs(img, matrix, interpolation, fill, supported_interpolation_modes, coeffs) without return types