'Fail if the function signatures do not match.
Fail the test if the function signature does not match
between the ``first`` function and the ``second``
function.
The function signature includes:
* function name,
* count of named parameters,
* sequence of named parameters,
* default values of named parameters,
* collector for arbitrary positional arguments,
* collector for arbitrary keyword arguments.'

def failUnlessFunctionSignatureMatch(self, first, second, msg=None):

    first_signature = get_function_signature(first)
    second_signature = get_function_signature(second)
    if (first_signature != second_signature):
        if (msg is None):
            first_signature_text = format_function_signature(first)
            second_signature_text = format_function_signature(second)
            msg = (textwrap.dedent('                                                                                Function    signatures    do    not    match:\n                                                                                                %(first_signature)r    !=    %(second_signature)r\n                                                                                Expected:\n                                                                                                %(first_signature_text)s\n                                                                                Got:\n                                                                                                %(second_signature_text)s') % vars())
        raise self.failureException(msg)
