code: def check_internal_consistency(self, **kwargs):
          inconsistent_vars = {}
          for variable in self.variables():
              diff_agg = self.check_aggregate(variable, **kwargs)
              if diff_agg is not None:
                  inconsistent_vars[variable + "-aggregate"] = diff_agg
              diff_regional = self.check_aggregate_region(variable, **kwargs)
              if diff_regional is not None:
                  inconsistent_vars[variable + "-regional"] = diff_regional
          return inconsistent_vars if inconsistent_vars else None