def METHOD_NAME(contracts: dict, profiles: Sequence[Profile]) -> None:
    # Print header.
    max_name_width = _compute_max_name_width(contracts)
    fmt = "{prefix} {function:<{width}} - avg: "
    dummy = fmt.format(prefix=_PREFIX_TERMINAL, function="-", width=max_name_width)
    print(" " * len(dummy), end="")
    for profile in profiles:
        max_gas_width = _compute_max_gas_width(contracts, profile)
        print("{0:>{width}}".format(profile.filename, width=max_gas_width), end=" │ ")
    print("{0:>{width}}".format("difference", width=max_gas_width), end=" │ ")
    print()
    # Print gas values.
    for contract, functions in contracts.items():
        print(contract)
        items = tuple(functions.items())
        for idx, (function, func_profiles) in enumerate(items):
            prefix = _PREFIX_TERMINAL if idx == len(items) - 1 else _PREFIX_NONTERMINAL
            print(fmt.format(prefix=prefix, function=function, width=max_name_width), end="")
            for profile in profiles:
                max_gas_width = _compute_max_gas_width(contracts, profile)
                gas = func_profiles.get(profile.filename)
                if gas is not None:
                    print("  {0:>{width},}  ".format(gas, width=max_gas_width), end="")
                else:
                    print("  {0:>{width}}  ".format("-", width=max_gas_width), end="")
            # Print the difference.
            gas_old = func_profiles.get(profiles[0].filename)
            gas_new = func_profiles.get(profiles[1].filename)
            if gas_old is None and gas_new is None:
                diff = "-"
            elif gas_old is None and gas_new is not None:
                diff = "{0:+,}".format(gas_new)
            elif gas_old is not None and gas_new is None:
                diff = "{0:+,}".format(-gas_old)
            elif gas_old is not None and gas_new is not None:
                gas_diff = gas_new - gas_old
                diff = "{0:+,}".format(gas_diff) if gas_diff != 0 else "0"
            print("  {0:>{width}}  ".format(diff, width=max_gas_width), end="")
            print()