code: def check_aggregate(df, variable, components=None, exclude_on_fail=False,
                      multiplier=1, **kwargs):
      
      fdf = df.filter(**kwargs)
      if len(fdf.data) > 0:
          vdf = fdf.check_aggregate(variable=variable, components=components,
                                    exclude_on_fail=exclude_on_fail,
                                    multiplier=multiplier)
          df.meta['exclude'] |= fdf.meta['exclude']  # update if any excluded
          return vdf
docs: Check whether the timeseries values match the aggregation
      of sub-categories
  
      Parameters
      ----------
      df: IamDataFrame instance
      args: see IamDataFrame.check_aggregate() for details
      kwargs: passed to `df.filter()`