code: def filter_by_pattern(self, pattern):
          
          _filt_values, _filt_datetimes = self._filter_by_pattern(pattern)
          collection = HourlyDiscontinuousCollection(
              self.header.duplicate(), _filt_values, _filt_datetimes)
          collection._validated_a_period = True
          return collection
docs: Filter the Data Collection based on a list of booleans.
  
          Args:
              pattern: A list of True/False values.  Typically, this is a list
                  with a length matching the length of the Data Collections values
                  but it can also be a pattern to be repeated over the Data Collection.
  
          Return:
              A new Data Collection with filtered data