class_docstr: Prepare hierarchical data, including aggregate levels, from bottom level.
  
  This transformer adds aggregate levels via summation to a DataFrame with a
  multiindex. The aggregate levels are included with the special tag "__total"
  in the index. The aggregate nodes are discovered from top-to-bottom from
  the input data multiindex.
  
  Parameters
  ----------
  flatten_single_level : boolean (default=True)
      Remove aggregate nodes, i.e. ("__total"), where there is only a single
      child to the level
  
  See Also
  --------
  ReconcilerForecaster
  Reconciler
  
  References
  ----------
  .. [1] https://otexts.com/fpp3/hierarchical.html
  
  Examples
  --------
  >>> from sktime.transformations.hierarchical.aggregate import Aggregator
  >>> from sktime.utils._testing.hierarchical import _bottom_hier_datagen
  >>> agg = Aggregator()
  >>> y = _bottom_hier_datagen(
  ...     no_bottom_nodes=3,
  ...     no_levels=1,
  ...     random_seed=123,
  ... )
  >>> y = agg.fit_transform(y)
code: def __init__(self, flatten_single_levels=True):
      self.flatten_single_levels = flatten_single_levels
  
      super().__init__()
  
file_path: sktime/sktime/transformations/hierarchical/aggregate.py
imports: import numpy
  import pandas
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.warnings import warn
label_desc: Use image node_id 1 to create a new Aggregator object from inherited base classes: BaseTransformer with example: obj = Aggregator(flatten_single_levels)