code: def _maybe_image_input(doc):
      # type: (np.ndarray) -> bool
      """Decide whether ``doc`` represents an image input."""
      rank = len(doc.shape)
      # image with channels or without (spatial only)
      return rank == 4 or rank == 3
  
imports: from __future__ import absolute_import
  from typing import Union, Optional, Callable, Tuple, List, TYPE_CHECKING
  import numpy
  import keras
  import keras.backend
  from keras.models import Model
  from keras.layers import Layer
  from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, GlobalMaxPooling2D, GlobalAveragePooling2D
  from keras.preprocessing.image import array_to_img
  from eli5.base import Explanation, TargetExplanation
  from eli5.explain import explain_prediction
  from .gradcam import gradcam, gradcam_backend
label_desc: Use image node_id 5 for calling a global function with example usage: _maybe_image_input(doc) and returns: unknown