code: def is_time_valid(self, timestamp):
          
          sec_from_morning = get_sec_from_morning(timestamp)
          return (self.is_valid and
                  self.hstart * 3600 + self.mstart * 60 <=
                  sec_from_morning <=
                  self.hend * 3600 + self.mend * 60)
docs: Check if time is valid for this Timerange
  
          If sec_from_morning is not provided, get the value.
  
          :param timestamp: time to check
          :type timestamp: int
          :return: True if time is valid (in interval), False otherwise
          :rtype: bool