code: def validate(self, criteria={}, exclude_on_fail=False):
          
          df = _apply_criteria(self.data, criteria, in_range=False)
  
          if not df.empty:
              msg = '{} of {} data points to not satisfy the criteria'
              logger().info(msg.format(len(df), len(self.data)))
  
              if exclude_on_fail and len(df) > 0:
                  self._exclude_on_fail(df)
  
              return df
docs: Validate scenarios using criteria on timeseries values
  
          Parameters
          ----------
          criteria: dict
             dictionary with variable keys and check values
              ('up' and 'lo' for respective bounds, 'year' for years)
          exclude_on_fail: bool, default False
              flag scenarios failing validation as `exclude: True`