code: def expand(self, *sizes: int) -> PivotedCholesky:
      fields = {}
      for name, ndim in {"perm": 1, "diag": 1, "tril": 2}.items():
          src = getattr(self, name)
          if src is not None:
              fields[name] = src.expand(sizes + src.shape[-ndim:])
      return type(self)(step=self.step, **fields)
  
file_path: botorch/botorch/utils/probability/linalg.py
imports: from __future__ import annotations
  from dataclasses import dataclass, InitVar
  from itertools import chain
  from typing import Any, Optional, Sequence
  import torch
  from botorch.utils.probability.utils import swap_along_dim_
  from linear_operator.utils.errors import NotPSDError
  from torch import LongTensor, Tensor
  from torch.nn.functional import pad
label_desc: Use image node_id 5 for calling the PivotedCholesky obj's underlying member method code with example usage: obj.expand() and returns: type