<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assert_equal(first, second, msg=None, extras=None):
 """Assert the equality of objects, otherwise fail the test. Error message is "first != second" by default. Additional explanation can be supplied in the message. Args: first: The first object to compare. second: The second object to compare. msg: A string that adds additional info about the failure. extras: An optional field for extra information to be included in test result. """

    my_msg = None
    try:
        _pyunit_proxy.assertEqual(first, second)
    except AssertionError as e:
        my_msg = str(e)
        if msg:
            my_msg = "%s %s" % (my_msg, msg)

    # This raise statement is outside of the above except statement to prevent
    # Python3's exception message from having two tracebacks.
    if my_msg is not None:
        raise signals.TestFailure(my_msg, extras=extras)