code: def _is_pil_image(img: Any) -> bool:
      if accimage is not None:
          return isinstance(img, (Image.Image, accimage.Image))
      else:
          return isinstance(img, Image.Image)
  
imports: import numbers
  from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from PIL import Image, ImageEnhance, ImageOps
label_desc: Use image node_id 1 for calling a global function with example usage: _is_pil_image(img) and returns: isinstance, isinstance