code: def compute_subset_indices(
      q: int, device: Optional[torch.device] = None
  ) -> BufferDict[str, Tensor]:
      r"""Compute all (2^q - 1) distinct subsets of {1, ..., `q`}.
  
      Args:
          q: An integer defininig the set {1, ..., `q`} whose subsets to compute.
  
      Returns:
          A dict that maps "q choose i" to all size-i subsets of {1, ..., `q_out`}.
      """
      indices = torch.arange(q, dtype=torch.long, device=device)
      return BufferDict(
          {
              f"q_choose_{i}": torch.tensor(
                  list(combinations(indices, i)),
                  dtype=torch.long,
                  device=device,
              )
              for i in range(1, q + 1)
          }
      )
  
imports: from __future__ import annotations
  import warnings
  from copy import deepcopy
  from itertools import combinations
  from typing import Callable, List, Optional, Union
  import torch
  from botorch.acquisition.cached_cholesky import CachedCholeskyMCSamplerMixin
  from botorch.acquisition.multi_objective.objective import MCMultiOutputObjective
  from botorch.acquisition.multi_objective.utils import prune_inferior_points_multi_objective
  from botorch.exceptions.errors import BotorchError, BotorchTensorDimensionError, UnsupportedError
  from botorch.exceptions.warnings import BotorchWarning
  from botorch.models.model import Model
  from botorch.sampling.base import MCSampler
  from botorch.utils.multi_objective.box_decompositions.box_decomposition_list import BoxDecompositionList
  from botorch.utils.multi_objective.box_decompositions.dominated import DominatedPartitioning
  from botorch.utils.multi_objective.box_decompositions.non_dominated import FastNondominatedPartitioning, NondominatedPartitioning
  from botorch.utils.multi_objective.box_decompositions.utils import _pad_batch_pareto_frontier
  from botorch.utils.objective import compute_feasibility_indicator
  from botorch.utils.torch import BufferDict
  from torch import Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: compute_subset_indices(q, device) and returns: BufferDict