<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, line):
 """ Append 'line' to contents where 'line' is an entire line or a list of lines. If self.unique is False it will add regardless of contents. Multi-line strings are converted to a list delimited by new lines. :param line: String or List of Strings; arbitrary string(s) to append to file contents. :return: Boolean; whether contents were changed during this method call. """

        if self.unique is not False and self.unique is not True:
            raise AttributeError("Attribute 'unique' is not True or False.")
        self.log('add({0}); unique={1}'.format(line, self.unique))
        if line is False:
            return False
        if isinstance(line, str):
            line = line.split('\n')
        if not isinstance(line, list):
            raise TypeError("Parameter 'line' not a 'string' or 'list', is {0}".format(type(line)))
        local_changes = False
        for this in line:
            if self.unique is False or this not in self.contents:
                self.contents.append(this)
                self.changed = local_changes = True
        if self.sorted and local_changes:
            self.sort()
        return local_changes