def METHOD_NAME(output, inputs):
    """Combine timing.csv or measurements.csv files into a single one."""
    columns = None
    with open(join(output, "timing.csv"), "w") as out:
        out_csv = csv.writer(out)
        for file_name in inputs:
            fmt = get_format(file_name)
            if fmt == "row-based":
                values = read_row_based_csv(file_name)
            else:
                assert fmt == "column-based"
                values = read_column_based_csv(file_name)
            values_header = next(values)
            if columns is None:
                columns = values_header
                out_csv.writerow(columns)
            if columns != values_header:
                raise ValueError(
                    "Column names in {0} don't match column "
                    "names from first input file".format(file_name))
            out_csv.writerows(values)