<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tail(self, n):
 """Returns the last n rows. Args: n: Integer containing the number of rows to return. Returns: DataManager containing the last n rows of the original DataManager. """

        # See head for an explanation of the transposed behavior
        if n < 0:
            n = max(0, len(self.index) + n)
        if self._is_transposed:
            result = self.__constructor__(
                self.data.transpose().take(1, -n).transpose(),
                self.index[-n:],
                self.columns,
                self._dtype_cache,
            )
            result._is_transposed = True
        else:
            result = self.__constructor__(
                self.data.take(0, -n), self.index[-n:], self.columns, self._dtype_cache
            )
        return result