code: def get_shape(img: Any) -> Tuple[int, int]:
      if isinstance(img, np.ndarray):
          rows, cols = img.shape[:2]
          return rows, cols
  
      try:
          import torch
  
          if torch.is_tensor(img):
              rows, cols = img.shape[-2:]
              return rows, cols
      except ImportError:
          pass
  
      raise RuntimeError(
          f"Albumentations supports only numpy.ndarray and torch.Tensor data type for image. Got: {type(img)}"
      )
  
imports: from __future__ import absolute_import
  from abc import ABC, abstractmethod
  from typing import Any, Dict, Optional, Sequence, Tuple
  import numpy
  from .serialization import Serializable
label_desc: Use image node_id 1 for calling a global function with example usage: get_shape(img) and returns: rows,  cols, rows,  cols