@classmethod
def check_summary(cls, a, aidx, b, bidx):
    """Determine if two summary structures are equivalent,
        printing differences in the error if they are not.

        Args:
            a (dict): Summary information for an element type defintion.
            aidx (int): Index of element summarized by a that is used
                in the error message.
            b (dict): Summary information for an element type defintion.
            bidx (int): Index of element summarized by b that is used
                in the error message.

        Raises:
            AssertionError: If a and b are not equivalent.

        """
    if a == b:
        return
    assert len(a) == len(b)
    err_msg = []
    for k in a.keys():
        if a[k] != b[k]:
            err_msg.append(
                "The %s of element %d (%s) dosn't match element %d (%s=%s)" %
                (k, aidx, a[k], bidx, k, b[k]))
    raise AssertionError('\n'.join(err_msg))
