def assert_equal(a, b, msg=""):
    """asserts that a equals b, like nose's assert_equal,
    but allows custom message to start. Passes a and b to
    format string as well. So you can use '{0}' and '{1}'
    to display a and b.

    Examples
    --------
    >>> assert_equal(2, 2, "apples")
    >>> assert_equal(5.2, 1.2, "{0} was really a dead parrot")
    Traceback (most recent call last):
        ...
    AssertionError: 5.2 was really a dead parrot: 5.2 != 1.2
    """
    assert a == b, (msg.format(a, b), a, b) % "%s: %r != %r"
dataset/ETHPy150Open pydata/pandas/pandas/util/testing.py/assert_equal/swapped operands of `%`