code: def test_make_scipy_linear_constraints_unsupported(self):
      shapeX = torch.Size([2, 1, 4])
      coefficients = torch.tensor([1.5, -1.0], device=self.device)
  
      # test that >2-dim indices raises an UnsupportedError
      indices = torch.tensor(
          [0, 1], dtype=torch.long, device=self.device
      )
      indices = indices.unsqueeze(0).unsqueeze(0)
      with self.assertRaises(UnsupportedError):
          make_scipy_linear_constraints(
              shapeX=shapeX,
              inequality_constraints=[(indices, coefficients, 1.0)],
              equality_constraints=[(indices, coefficients, 1.0)],
          )
      # test that out of bounds index raises an error
      indices = torch.tensor(
          [0, 4], dtype=torch.long, device=self.device
      )
      with self.assertRaises(RuntimeError):
          make_scipy_linear_constraints(
              shapeX=shapeX,
              inequality_constraints=[(indices, coefficients, 1.0)],
              equality_constraints=[(indices, coefficients, 1.0)],
          )
      # test that two-d index out-of-bounds raises an error
      # q out of bounds
      indices = torch.tensor(
          [[0, 0], [1, 0]], dtype=torch.long, device=self.device
      )
      with self.assertRaises(RuntimeError):
          make_scipy_linear_constraints(
              shapeX=shapeX,
              inequality_constraints=[(indices, coefficients, 1.0)],
              equality_constraints=[(indices, coefficients, 1.0)],
          )
      # d out of bounds
      indices = torch.tensor(
          [[0, 0], [0, 4]], dtype=torch.long, device=self.device
      )
      with self.assertRaises(RuntimeError):
          make_scipy_linear_constraints(
              shapeX=shapeX,
              inequality_constraints=[(indices, coefficients, 1.0)],
              equality_constraints=[(indices, coefficients, 1.0)],
          )
  
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 8 for calling the TestParameterConstraints obj's underlying member method code with example usage: obj.test_make_scipy_linear_constraints_unsupported() without return types