code: def test_check_target(args):
      output_shape = args["output_shape"]
      target = args["target"]
      nb_samples = args["nb_samples"]
      bad_target = args["bad_target"]
  
      if bad_target:
          with pytest.raises((ValueError, AttributeError)):
              _check_target(output_shape, target, nb_samples)
      else:
          _check_target(output_shape, target, nb_samples)
  
imports: from functools import partial
  import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  from tensorflow.keras import Model
  from alibi.api.interfaces import Explanation
  from alibi.explainers import IntegratedGradients
  from alibi.explainers.integrated_gradients import _get_target_from_target_fn, _run_forward_from_layer, _run_forward_to_layer, _check_target, _select_target
label_desc: Use image node_id 19 for calling a global function with example usage: test_check_target(args) without return types