Check if matrix and its mediation matrix are compliant.

        Args:
            dsm (:class:`DesignStructureMatrix`): the DSM to check.
            complete_mediation_matrix (list of list of int): 2-dim array

        Returns:
            bool: True if compliant, else False

def matrices_compliance(dsm, complete_mediation_matrix):
        """
        Check if matrix and its mediation matrix are compliant.

        Args:
            dsm (:class:`DesignStructureMatrix`): the DSM to check.
            complete_mediation_matrix (list of list of int): 2-dim array

        Returns:
            bool: True if compliant, else False
        """
        matrix = dsm.data
        rows_dep_matrix = len(matrix)
        cols_dep_matrix = len(matrix[0])
        rows_med_matrix = len(complete_mediation_matrix)
        cols_med_matrix = len(complete_mediation_matrix[0])

        if (rows_dep_matrix != rows_med_matrix or
                cols_dep_matrix != cols_med_matrix):
            raise DesignStructureMatrixError(
                'Matrices are NOT compliant '
                '(number of rows/columns not equal)')

        discrepancy_found = False
        message = []
        for i in range(0, rows_dep_matrix):
            for j in range(0, cols_dep_matrix):
                if ((complete_mediation_matrix[i][j] == 0 and
                        matrix[i][j] > 0) or
                        (complete_mediation_matrix[i][j] == 1 and
                         matrix[i][j] < 1)):
                    discrepancy_found = True
                    message.append(
                        'Untolerated dependency at %s:%s (%s:%s): '
                        '%s instead of %s' % (
                            i, j, dsm.entities[i], dsm.entities[j],
                            matrix[i][j], complete_mediation_matrix[i][j]))

        message = '\n'.join(message)

        return not discrepancy_found, message