def novel(self, record): """Return True if this record exhibits some behaviour that no previous record passed in to novel has shown""" if array_contained(record.labels, self.data): return False self.merge_record(record) return True
def contained_in(self, other): """Return True if every behaviour observed by this record is also observed in the other""" return array_contained(self.labels, other.labels)