def agg_shape(self, shp, aggregate_by):
        """
        :returns: a shape shp + (T, ...) depending on the tagnames
        """
        return shp + tuple(
            len(getattr(self, tagname)) - 1 for tagname in aggregate_by)
:returns: a shape shp + (T, ...) depending on the tagnames