<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def element_isaligned(self, other):
 """check if matrices are aligned for element-wise operations Parameters other : Matrix Returns ------- bool : bool True if aligned, False if not aligned """

        assert isinstance(other, Matrix), \
            "Matrix.isaligned(): other argument must be type Matrix, not: " +\
            str(type(other))
        if self.row_names == other.row_names \
                and self.col_names == other.col_names:
            return True
        else:
            return False