code: def bad_predictor(x: np.ndarray) -> list:
      """
      A dummy predictor emulating the following:
       - Expecting an array of certain dimension
       - Returning an incorrect type
       This is used below to test custom exception functionality.
      """
      if x.shape[1] != 3:
          raise ValueError
      return list(x)
  
file_path: alibi/alibi/explainers/tests/test_anchor_tabular.py
imports: from collections import OrderedDict, defaultdict
  from copy import deepcopy
  import numpy
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from alibi.api.defaults import DEFAULT_META_ANCHOR, DEFAULT_DATA_ANCHOR
  from alibi.exceptions import NotFittedError, PredictorCallError, PredictorReturnTypeError
  from alibi.explainers import AnchorTabular, DistributedAnchorTabular
  from alibi.explainers.tests.utils import predict_fcn
label_desc: Use image node_id 6 for calling a global function with example usage: bad_predictor(x) and returns: list