def METHOD_NAME(io_size_bytes, qd, rw_mix, cpu_mask, run_num, workload, run_time_sec):
    results_array = []
    # If json file has results for multiple fio jobs pick the results from the right job
    job_pos = 0
    # generate the next result line that will be added to the output csv file
    results = str(io_size_bytes) + "," + str(qd) + "," + str(rw_mix) + "," \
        + str(workload) + "," + str(cpu_mask) + "," + str(run_time_sec) + "," + str(run_num)
    # Read the results of this run from the test result file
    string = "s_" + str(io_size_bytes) + "_q_" + str(qd) + "_m_" + str(rw_mix) + "_c_" + str(cpu_mask) + "_run_" + str(run_num)
    with open(string) as json_file:
        data = json.load(json_file)
        job_name = data['jobs'][job_pos]['jobname']
        # print "FIO job name: ", job_name
        if 'lat_ns' in data['jobs'][job_pos]['read']:
            lat = 'lat_ns'
            lat_units = 'ns'
        else:
            lat = 'lat'
            lat_units = 'us'
        read_iops = float(data['jobs'][job_pos]['read']['iops'])
        read_bw = float(data['jobs'][job_pos]['read']['bw'])
        read_avg_lat = float(data['jobs'][job_pos]['read'][lat]['mean'])
        read_min_lat = float(data['jobs'][job_pos]['read'][lat]['min'])
        read_max_lat = float(data['jobs'][job_pos]['read'][lat]['max'])
        write_iops = float(data['jobs'][job_pos]['write']['iops'])
        write_bw = float(data['jobs'][job_pos]['write']['bw'])
        write_avg_lat = float(data['jobs'][job_pos]['write'][lat]['mean'])
        write_min_lat = float(data['jobs'][job_pos]['write'][lat]['min'])
        write_max_lat = float(data['jobs'][job_pos]['write'][lat]['max'])
        print("%-10s" % "IO Size", "%-10s" % "QD", "%-10s" % "Mix",
              "%-10s" % "Workload Type", "%-10s" % "CPU Mask",
              "%-10s" % "Run Time", "%-10s" % "Run Num",
              "%-15s" % "Read IOps",
              "%-10s" % "Read MBps", "%-15s" % "Read Avg. Lat(" + lat_units + ")",
              "%-15s" % "Read Min. Lat(" + lat_units + ")", "%-15s" % "Read Max. Lat(" + lat_units + ")",
              "%-15s" % "Write IOps",
              "%-10s" % "Write MBps", "%-15s" % "Write Avg. Lat(" + lat_units + ")",
              "%-15s" % "Write Min. Lat(" + lat_units + ")", "%-15s" % "Write Max. Lat(" + lat_units + ")")
        print("%-10s" % io_size_bytes, "%-10s" % qd, "%-10s" % rw_mix,
              "%-10s" % workload, "%-10s" % cpu_mask, "%-10s" % run_time_sec,
              "%-10s" % run_num, "%-15s" % read_iops, "%-10s" % read_bw,
              "%-15s" % read_avg_lat, "%-15s" % read_min_lat, "%-15s" % read_max_lat,
              "%-15s" % write_iops, "%-10s" % write_bw, "%-15s" % write_avg_lat,
              "%-15s" % write_min_lat, "%-15s" % write_max_lat)
        results = results + "," + str(read_iops) + "," + str(read_bw) + "," \
            + str(read_avg_lat) + "," + str(read_min_lat) + "," + str(read_max_lat) \
            + "," + str(write_iops) + "," + str(write_bw) + "," + str(write_avg_lat) \
            + "," + str(write_min_lat) + "," + str(write_max_lat)
        with open(result_file_name, "a") as result_file:
            result_file.write(results + "\n")
        results_array = []
    return