code: def test_set_bounds():
      pbounds = {
          "p1": (0, 1),
          "p3": (0, 3),
          "p2": (0, 2),
          "p4": (0, 4),
      }
      optimizer = BayesianOptimization(
          target_func, pbounds, random_state=1
      )
  
      # Ignore unknown keys
      optimizer.set_bounds({"other": (7, 8)})
      assert all(optimizer.space.bounds[:, 0] == np.array([0, 0, 0, 0]))
      assert all(optimizer.space.bounds[:, 1] == np.array([1, 2, 3, 4]))
  
      # Update bounds accordingly
      optimizer.set_bounds({"p2": (1, 8)})
      assert all(optimizer.space.bounds[:, 0] == np.array([0, 1, 0, 0]))
      assert all(optimizer.space.bounds[:, 1] == np.array([1, 8, 3, 4]))
  
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 12 for calling a global function with example usage: test_set_bounds() without return types