def METHOD_NAME(self, key=None) -> Union[StorageAggregate, StorageAggregates]:
    if key is None:
        return StorageAggregates(self._aggregations) if self._aggregations is not None else None
    if self._aggregations is None or key not in self._aggregations:
        raise ValueError(f"Aggregation {key} not available.")
    return StorageAggregate(**self._aggregations[key])