class_docstr: A multi-output Model represented by a list of independent models.
  
  All BoTorch models are acceptable as inputs. The cost of this flexibility is
  that `ModelList` does not support all methods that may be implemented by its
  component models. One use case for `ModelList` is combining a regression
  model and a deterministic model in one multi-output container model, e.g.
  for cost-aware or multi-objective optimization where one of the outcomes is
  a deterministic function of the inputs.
class_docstr_tok: ["A","multi-output","Model","represented","by","a","list","of","independent","models",".","All","BoTorch","models","are","acceptable","as","inputs",".","The","cost","of","this","flexibility","is","that","`","ModelList","`","does","not","support","all","methods","that","may","be","implemented","by","its","component","models",".","One","use","case","for","`","ModelList","`","is","combining","a","regression","model","and","a","deterministic","model","in","one","multi-output","container","model",",","e.g",".","for","cost-aware","or","multi-objective","optimization","where","one","of","the","outcomes","is","a","deterministic","function","of","the","inputs","."]
docstr: Convert global subset indices to indices for the individual models.
  
  Args:
      idcs: A list of indices to which the `ModelList` model is to be
          subset to.
  
  Returns:
      A dictionary mapping model indices to subset indices of the
          respective model in the `ModelList`.
code: def _get_group_subset_indices(
      self, idcs: Optional[List[int]]
  ) -> Dict[int, List[int]]:
      r"""Convert global subset indices to indices for the individual models.
  
      Args:
          idcs: A list of indices to which the `ModelList` model is to be
              subset to.
  
      Returns:
          A dictionary mapping model indices to subset indices of the
              respective model in the `ModelList`.
      """
      if idcs is None:
          return {i: None for i in range(len(self.models))}
      output_sizes = [model.num_outputs for model in self.models]
      cum_output_sizes = np.cumsum(output_sizes)
      idcs = [idx % cum_output_sizes[-1] for idx in idcs]
      group_indices: Dict[int, List[int]] = defaultdict(list)
      for idx in idcs:
          grp_idx = np.argwhere(idx < cum_output_sizes)[0].item()
          sub_idx = idx - int(np.sum(output_sizes[:grp_idx]))
          group_indices[grp_idx].append(sub_idx)
      return group_indices
  
imports: from __future__ import annotations
  import warnings
  from abc import ABC, abstractmethod
  from collections import defaultdict
  from copy import deepcopy
  from typing import Any, Callable, Dict, List, Mapping, Optional, Set, TYPE_CHECKING, TypeVar, Union
  import numpy
  import torch
  from botorch import settings
  from botorch.exceptions.errors import BotorchTensorDimensionError, DeprecationError, InputDataError
  from botorch.logging import shape_to_str
  from botorch.models.utils.assorted import fantasize
  from botorch.posteriors import Posterior, PosteriorList
  from botorch.sampling.base import MCSampler
  from botorch.sampling.list_sampler import ListSampler
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.transforms import is_fully_bayesian
  from gpytorch.likelihoods.gaussian_likelihood import FixedNoiseGaussianLikelihood
  from torch import Tensor
  from torch.nn import Module, ModuleDict, ModuleList
label_desc: Use image node_id 2 for calling the ModelList obj's underlying member method code with example usage: obj._get_group_subset_indices(idcs) and returns: group_indices, unknown