code: def _is_numpy_image(img: Any) -> bool:
      return img.ndim in {2, 3}
  
imports: import math
  import numbers
  import sys
  import warnings
  from enum import Enum
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from torch import Tensor
  from ..utils import _log_api_usage_once
  from .None import _functional_pil, _functional_tensor
label_desc: Use image node_id 6 for calling a global function with example usage: _is_numpy_image(img) and returns: unknown