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: Subset the model along the output dimension.
  
  Args:
      idcs: The output indices to subset the model to. Relative to the
          overall number of outputs of the model.
  
  Returns:
      A `Model` (either a `ModelList` or one of the submodels) with
      the outputs subset to the indices in `idcs`.
  
  Internally, this drops (if single-output) or subsets (if multi-output)
  the constitutent models and returns them as a `ModelList`. If the
  result is a single (possibly subset) model from the list, returns this
  model (instead of forming a degenerate singe-model `ModelList`).
  For instance, if `m = ModelList(m1, m2)` with `m1` a two-output model
  and `m2` a single-output model, then `m.subset_output([1]) ` will return
  the model `m1` subset to its second output.
code: def subset_output(self, idcs: List[int]) -> Model:
      r"""Subset the model along the output dimension.
  
      Args:
          idcs: The output indices to subset the model to. Relative to the
              overall number of outputs of the model.
  
      Returns:
          A `Model` (either a `ModelList` or one of the submodels) with
          the outputs subset to the indices in `idcs`.
  
      Internally, this drops (if single-output) or subsets (if multi-output)
      the constitutent models and returns them as a `ModelList`. If the
      result is a single (possibly subset) model from the list, returns this
      model (instead of forming a degenerate singe-model `ModelList`).
      For instance, if `m = ModelList(m1, m2)` with `m1` a two-output model
      and `m2` a single-output model, then `m.subset_output([1]) ` will return
      the model `m1` subset to its second output.
      """
      group_indices = self._get_group_subset_indices(idcs=idcs)
      subset_models = [
          deepcopy(self.models[grp_idx].subset_output(idcs=sub_idcs))
          for grp_idx, sub_idcs in group_indices.items()
      ]
      if len(subset_models) == 1:
          return subset_models[0]
      return self.__class__(*subset_models)
  
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 6 for calling the ModelList obj's underlying member method code with example usage: obj.subset_output(idcs) and returns: self, subset_models