def add_data(self, data): if data['frequency'] in self.frequency_range and data['type'] == self.data_type: self.data.append(data)