code: def test_image_classification(
      keras_clf, cat_dog_image, area, targets
  ):
      doc, image = cat_dog_image
      # check explanation
      res = eli5.explain_prediction(
          keras_clf, doc, image=image, targets=targets
      )
      assert_attention_over_area(res, area)
  
      # check formatting
      res.image = res.image.convert("RGBA")  # explicitly normalize
      overlay = format_as_image(res)
      assert_good_external_format(res, overlay)
  
      # check show function with image auto-conversion
      show_overlay = eli5.show_prediction(
          keras_clf, doc, targets=targets
      )
  
      assert_pixel_by_pixel_equal(overlay, show_overlay)
  
file_path: eli5/tests/test_keras_integration.py
imports: from __future__ import print_function
  import pytest
  import numpy
  from PIL import Image
  from keras.applications import mobilenet_v2
  from keras.models import Sequential
  import eli5
  from eli5.base import Explanation
  from eli5 import format_as_image
  from eli5.formatters.image import expand_heatmap
  from .utils_image import assert_pixel_by_pixel_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_image_classification(keras_clf, cat_dog_image, area, targets) without return types