code: def bad_predictor(x: np.ndarray) -> list:
      """
      A dummy predictor emulating the following:
       - Expecting an array of certain dimension (4 dimensions - 1 batch, 2 spatial, 1 channel)
       - Returning an incorrect type
       This is used below to test custom exception functionality.
      """
      if x.ndim != 4:
          raise ValueError
      return list(x)
  
file_path: alibi/alibi/explainers/tests/test_anchor_image.py
imports: import pytest
  from pytest_lazyfixture import lazy_fixture
  import numpy
  import tensorflow
  import torch
  from alibi.api.defaults import DEFAULT_META_ANCHOR, DEFAULT_DATA_ANCHOR_IMG
  from alibi.exceptions import PredictorCallError, PredictorReturnTypeError
  from alibi.explainers.anchors.anchor_image import AnchorImage, AnchorImageSampler, scale_image
label_desc: Use image node_id 6 for calling a global function with example usage: bad_predictor(x) and returns: list