code: def _convert_bounds_to_inequality_constraints(
      bounds: Tensor,
  ) -> Tuple[Tensor, Tensor]:
      r"""Convert bounds into inequality constraints of the form Ax <= b.
  
      Args:
          bounds: A `2 x d`-dim tensor of bounds
  
      Returns:
          A two-element tuple containing
              - A: A `2d x d`-dim tensor of coefficients
              - b: A `2d x 1`-dim tensor containing the right hand side
      """
      d = bounds.shape[-1]
      eye = torch.eye(d, dtype=bounds.dtype, device=bounds.device)
      lower, upper = bounds
      lower_finite, upper_finite = bounds.isfinite()
      A = torch.cat([-eye[lower_finite], eye[upper_finite]], dim=0)
      b = torch.cat(
          [-lower[lower_finite], upper[upper_finite]], dim=0
      ).unsqueeze(-1)
      return A, b
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from typing import Any, Generator, Iterable, List, Optional, Tuple, TYPE_CHECKING
  import numpy
  import scipy
  import torch
  from botorch.exceptions.errors import BotorchError
  from botorch.sampling.qmc import NormalQMCEngine
  from botorch.utils.transforms import unnormalize
  from scipy.spatial import Delaunay, HalfspaceIntersection
  from torch import LongTensor, Tensor
  from torch.quasirandom import SobolEngine
label_desc: Use image node_id 8 for calling a global function with example usage: _convert_bounds_to_inequality_constraints(bounds) and returns: A,  b