code: def draw_sobol_samples(
      bounds: Tensor,
      n: int,
      q: int,
      batch_shape: Optional[Iterable[int], torch.Size] = None,
      seed: Optional[int] = None,
  ) -> Tensor:
      r"""Draw qMC samples from the box defined by bounds.
  
      Args:
          bounds: A `2 x d` dimensional tensor specifying box constraints on a
              `d`-dimensional space, where bounds[0, :] and bounds[1, :] correspond
              to lower and upper bounds, respectively.
          n: The number of (q-batch) samples. As a best practice, use powers of 2.
          q: The size of each q-batch.
          batch_shape: The batch shape of the samples. If given, returns samples
              of shape `n x batch_shape x q x d`, where each batch is an
              `n x q x d`-dim tensor of qMC samples.
          seed: The seed used for initializing Owen scrambling. If None (default),
              use a random seed.
  
      Returns:
          A `n x batch_shape x q x d`-dim tensor of qMC samples from the box
          defined by bounds.
  
      Example:
          >>> bounds = torch.stack([torch.zeros(3), torch.ones(3)])
          >>> samples = draw_sobol_samples(bounds, 16, 2)
      """
      batch_shape = batch_shape or torch.Size()
      batch_size = int(torch.prod(torch.tensor(batch_shape)))
      d = bounds.shape[-1]
      lower = bounds[0]
      rng = bounds[1] - bounds[0]
      sobol_engine = SobolEngine(q * d, scramble=True, seed=seed)
      samples_raw = sobol_engine.draw(batch_size * n, dtype=lower.dtype)
      samples_raw = samples_raw.view(*batch_shape, n, q, d).to(
          device=lower.device
      )
      if batch_shape != torch.Size():
          samples_raw = samples_raw.permute(
              -3, *range(len(batch_shape)), -2, -1
          )
      return lower + rng * samples_raw
  
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 2 for calling a global function with example usage: draw_sobol_samples(bounds, n, q, batch_shape, seed) and returns: unknown