code: def test_blackbox_existing_predictions(
      art_warning, get_diabetes_dataset
  ):
      try:
          (x_train, _), (x_test, y_test) = get_diabetes_dataset
  
          bb = BlackBoxRegressor(
              (x_test.astype(ART_NUMPY_DTYPE), y_test),
              (10,),
          )
          pred = bb.predict(x_test.astype(ART_NUMPY_DTYPE))
          assert np.array_equal(pred, y_test.astype(ART_NUMPY_DTYPE))
          assert np.count_nonzero(bb.compute_loss(x_test, y_test)) == 0
          assert (
              np.count_nonzero(
                  bb.compute_loss_from_predictions(pred, y_test)
              )
              == 0
          )
  
          with pytest.raises(ValueError):
              bb.predict(x_train)
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/estimators/regression/test_blackbox.py
imports: import pytest
  import numpy
  from art.estimators.regression import BlackBoxRegressor
  from art.config import ART_NUMPY_DTYPE
  from tests.utils import ARTTestException
label_desc: Use image node_id 2 for calling a global function with example usage: test_blackbox_existing_predictions(art_warning, get_diabetes_dataset) without return types