code: def test_single_value_objective():
      """
      As documented [here](https://github.com/scipy/scipy/issues/16898)
      scipy is changing the way they handle 1D objectives inside minimize.
      This is a simple test to make sure our tests fail if scipy updates this
      in future
      """
      pbounds = {"x": (-10, 10)}
  
      optimizer = BayesianOptimization(
          f=lambda x: x * 3,
          pbounds=pbounds,
          verbose=2,
          random_state=1,
      )
      optimizer.maximize(
          init_points=2,
          n_iter=3,
      )
  
imports: import pytest
  import numpy
  from bayes_opt import UtilityFunction
  from bayes_opt import BayesianOptimization
  from bayes_opt.logger import ScreenLogger
  from bayes_opt.event import Events, DEFAULT_EVENTS
  from bayes_opt.util import NotUniqueError
  import pickle
  import os
label_desc: Use image node_id 16 for calling a global function with example usage: test_single_value_objective() without return types