code: def is_time_valid(self, timestamp):
          
          if hasattr(self, 'exclude'):
              for daterange in self.exclude:
                  if daterange.is_time_valid(timestamp):
                      return False
          for daterange in self.dateranges:
              if daterange.is_time_valid(timestamp):
                  return True
          return False
docs: Check if a time is valid or not
  
          :return: time is valid or not
          :rtype: bool