class_docstr: A grid of :class:`PlotlyViewPlot` instances.
  
  Args:
      plots: a :class:`PlotlyViewPlot` or iterable of :class:`PlotlyViewPlot`
          instances
      shape (None): the ``(rows, cols)`` shape to use for the grid
      hgap (None): a horizontal spacing between the subplots, in ``[0, 1]``
      vgap (None): a vertical spacing between the subplots, in ``[0, 1]``
      init_view (None): an optional initial
          :class:`fiftyone.core.collections.SampleCollection` to load
      **kwargs: optional parameters for
          :meth:`plotly:plotly.graph_objects.Figure.update_layout`
code: def _init_aggregations(self):
      aggregations = []
      agg_lengths = []
      for plot in self.plots:
          aggs = plot._get_aggregations()
          if aggs is not None:
              aggregations.extend(aggs)
              agg_lengths.append(len(aggs))
          else:
              agg_lengths.append(None)
  
      if not aggregations:
          aggregations = None
          agg_lengths = None
  
      self._aggregations = aggregations
      self._agg_lengths = agg_lengths
  
imports: import itertools
  from operator import itemgetter
  import numpy
  import eta.core.utils
  import plotly.subplots
  import plotly.graph_objects
  import fiftyone.core.aggregations
  from .base import ViewPlot
  from .plotly import PlotlyWidgetMixin
label_desc: Use image node_id 2 for calling the ViewGrid obj's underlying member method code with example usage: obj._init_aggregations() without return types