<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def invers(self):
 """Return the invers matrix, if it can be calculated :return: Returns a new Matrix containing the invers :rtype: Matrix :raise: Raises an :py:exc:`ValueError` if the matrix is not inversible :note: Only a squared matrix with a determinant != 0 can be inverted. :todo: Reduce amount of create and copy operations """


        if self._columns != self._rows:
            raise ValueError("A square matrix is needed")
        mArray = self.get_array(False)
        appList = [0] * self._columns

        # add identity matrix to array in order to use gauss jordan algorithm
        for col in xrange(self._columns):
            mArray.append(appList[:])
            mArray[self._columns + col][col] = 1
        # create new Matrix and execute gass jordan algorithm
        exMatrix = Matrix.from_two_dim_array(2 * self._columns, self._rows, mArray)
        gjResult = exMatrix.gauss_jordan()
        # remove identity matrix from left side
        # TODO Implement slicing directly for Matrix
        gjResult.matrix = gjResult.matrix[self._columns:]
        gjResult._columns = len(gjResult.matrix)
        return gjResult