class_docstr: Base class for datasets consisting of labelled pairs `(X, Y)`
  and an optional `Yvar` that stipulates observations variances so
  that `Y[i] ~ N(f(X[i]), Yvar[i])`.
  
  Example:
  
  .. code-block:: python
  
      X = torch.rand(16, 2)
      Y = torch.rand(16, 1)
      feature_names = ["learning_rate", "embedding_dim"]
      outcome_names = ["neg training loss"]
      A = SupervisedDataset(
          X=X,
          Y=Y,
          feature_names=feature_names,
          outcome_names=outcome_names,
      )
      B = SupervisedDataset(
          X=DenseContainer(X, event_shape=X.shape[-1:]),
          Y=DenseContainer(Y, event_shape=Y.shape[-1:]),
          feature_names=feature_names,
          outcome_names=outcome_names,
      )
      assert A == B
code: def Yvar(self) -> Optional[Tensor]:
      if self._Yvar is None or isinstance(self._Yvar, Tensor):
          return self._Yvar
      return self._Yvar()
  
imports: from __future__ import annotations
  import collections
  import warnings
  from typing import Any, Dict, List, Optional, Union
  import torch
  from botorch.exceptions.errors import InputDataError, UnsupportedError
  from botorch.utils.containers import BotorchContainer, SliceContainer
  from torch import long, ones, Tensor
label_desc: Use image node_id 4 for calling the SupervisedDataset obj's underlying member method code with example usage: obj.Yvar() and returns: self, self