<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append(self, row):
 """ Appends a row to the list. Takes a dictionary, returns a row. """

        if isinstance(row, dict):
            row = self.Row(row)
        elif isinstance(row, self.Row):
            pass
        elif isinstance(row, SharePointListRow):
            raise TypeError("row must be a dict or an instance of SharePointList.Row, not SharePointListRow")
        else:
            raise TypeError("row must be a dict or an instance of SharePointList.Row")
        self.rows  # Make sure self._rows exists.
        self._rows.append(row)
        return row