code: def test_blackbox_predict_fn(art_warning, get_diabetes_dataset):
      try:
          from sklearn import linear_model
  
          (x_train, y_train), (x_test, y_test) = get_diabetes_dataset
          regr_model = linear_model.LinearRegression()
          regr_model.fit(x_train, y_train)
  
          bb = BlackBoxRegressor(regr_model.predict, (10,))
          pred = bb.predict(x_test)
          assert abs(y_test[0] - pred[0]) < 50
          assert abs(bb.compute_loss(x_test, y_test)[0] - 2000) < 100
          assert (
              abs(
                  bb.compute_loss_from_predictions(pred, y_test)[0]
                  - 2000
              )
              < 100
          )
  
          bbc = bb.get_classifier([50, 100, 200])
          pred_c = bbc.predict(x_test)
          assert pred_c.shape[1] == 4
  
      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 5 for calling a global function with example usage: test_blackbox_predict_fn(art_warning, get_diabetes_dataset) without return types