def format_funcline(name, mem_usage):
    """Create the output string for a function profile interval."""
    start_memory, start_timestamp = mem_usage[0]
    end_memory, end_timestamp = mem_usage[-1]
    return "FUNC {name} {0:.6f} {1:.4f} {2:.6f} {3:.4f}\n".format(
        start_memory,
        start_timestamp,
        end_memory,
        end_timestamp,
        name=name,
    )