code: def filter_by_pattern(self, pattern):
          
          _filt_values, _filt_datetimes = self._filter_by_pattern(pattern)
          if self._enumeration is None:
              self._get_mutable_enumeration()
          col_obj = self._enumeration['mutable'][self._collection_type]
          collection = col_obj(self.header.duplicate(), _filt_values, _filt_datetimes)
          collection._validated_a_period = self._validated_a_period
          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