code: def is_time_valid(self, timestamp):
          
          if self.is_time_day_valid(timestamp):
              for timerange in self.timeranges:
                  if timerange.is_time_valid(timestamp):
                      return True
          return False
docs: Check if time is valid for one of the timerange.
  
          :param timestamp: time to check
          :type timestamp: int
          :return: True if one of the timerange is valid for t, False otherwise
          :rtype: bool