code: def _validate_heatmap(heatmap):
      """Check that ``heatmap`` is a numpy array
      with float values between 0 and 1."""
      if not isinstance(heatmap, np.ndarray):
          raise TypeError(
              "heatmap must be a numpy.ndarray instance. "
              "Got: {}".format(heatmap)
          )
      mi = np.min(heatmap)
      ma = np.max(heatmap)
      if not (0 <= mi and ma <= 1):
          raise ValueError(
              "heatmap must contain float values "
              "between 0 and 1 inclusive. "
              "Got array with minimum: {} "
              "and maximum: {}".format(mi, ma)
          )
  
file_path: eli5/eli5/formatters/image.py
imports: from __future__ import absolute_import
  from typing import Union, Optional, Callable
  import numpy
  from PIL import Image
  import matplotlib.cm
  from eli5.base import Explanation
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_heatmap(heatmap) without return types