code: def test_make_scipy_bounds(self):
      X = torch.zeros(3, 1, 2)
      # both None
      self.assertIsNone(
          make_scipy_bounds(X=X, lower_bounds=None, upper_bounds=None)
      )
      # lower None
      upper_bounds = torch.ones(2)
      bounds = make_scipy_bounds(
          X=X, lower_bounds=None, upper_bounds=upper_bounds
      )
      self.assertIsInstance(bounds, Bounds)
      self.assertTrue(
          np.all(
              np.equal(
                  bounds.lb, np.full((3, 1, 2), float("-inf")).flatten()
              )
          )
      )
      self.assertTrue(
          np.all(np.equal(bounds.ub, np.ones((3, 1, 2)).flatten()))
      )
      # upper None
      lower_bounds = torch.zeros(2)
      bounds = make_scipy_bounds(
          X=X, lower_bounds=lower_bounds, upper_bounds=None
      )
      self.assertIsInstance(bounds, Bounds)
      self.assertTrue(
          np.all(np.equal(bounds.lb, np.zeros((3, 1, 2)).flatten()))
      )
      self.assertTrue(
          np.all(
              np.equal(
                  bounds.ub, np.full((3, 1, 2), float("inf")).flatten()
              )
          )
      )
      # floats
      bounds = make_scipy_bounds(
          X=X, lower_bounds=0.0, upper_bounds=1.0
      )
      self.assertIsInstance(bounds, Bounds)
      self.assertTrue(
          np.all(np.equal(bounds.lb, np.zeros((3, 1, 2)).flatten()))
      )
      self.assertTrue(
          np.all(np.equal(bounds.ub, np.ones((3, 1, 2)).flatten()))
      )
  
      # 1-d tensors
      bounds = make_scipy_bounds(
          X=X, lower_bounds=lower_bounds, upper_bounds=upper_bounds
      )
      self.assertIsInstance(bounds, Bounds)
      self.assertTrue(
          np.all(np.equal(bounds.lb, np.zeros((3, 1, 2)).flatten()))
      )
      self.assertTrue(
          np.all(np.equal(bounds.ub, np.ones((3, 1, 2)).flatten()))
      )
  
imports: from itertools import product
  from typing import Callable
  import numpy
  import torch
  from botorch.exceptions.errors import CandidateGenerationError, UnsupportedError
  from botorch.optim.parameter_constraints import _arrayify, _generate_unfixed_lin_constraints, _generate_unfixed_nonlin_constraints, _make_linear_constraints, _make_nonlinear_constraints, eval_lin_constraint, lin_constraint_jac, make_scipy_bounds, make_scipy_linear_constraints, make_scipy_nonlinear_inequality_constraints, nonlinear_constraint_is_feasible
  from botorch.utils.testing import BotorchTestCase
  from scipy.optimize import Bounds
label_desc: Use image node_id 1 for calling the TestMakeScipyBounds obj's underlying member method code with example usage: obj.test_make_scipy_bounds() without return types