code: def check_aggregate(self, variable, components=None, exclude_on_fail=False,
                          multiplier=1, **kwargs):
          
          # compute aggregate from components, return None if no components
          df_components = self.aggregate(variable, components)
          if df_components is None:
              return
  
          # filter and groupby data, use `pd.Series.align` for matching index
          rows = self._apply_filters(variable=variable)
          df_variable, df_components = (
              _aggregate(self.data[rows], 'variable').align(df_components)
          )
  
          # use `np.isclose` for checking match
          diff = df_variable[~np.isclose(df_variable, multiplier * df_components,
                                         **kwargs)]
  
          if len(diff):
              msg = '`{}` - {} of {} rows are not aggregates of components'
              logger().info(msg.format(variable, len(diff), len(df_variable)))
  
              if exclude_on_fail:
                  self._exclude_on_fail(diff.index.droplevel([2, 3, 4]))
  
              return IamDataFrame(diff, variable=variable).timeseries()
docs: Check whether a timeseries matches the aggregation of its components
  
          Parameters
          ----------
          variable: str
              variable to be checked for matching aggregation of sub-categories
          components: list of str, default None
              list of variables, defaults to all sub-categories of `variable`
          exclude_on_fail: boolean, default False
              flag scenarios failing validation as `exclude: True`
          multiplier: number, default 1
              factor when comparing variable and sum of components
          kwargs: passed to `np.isclose()`