<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def benchmark_mitdb(detector, verbose=False, print_results=False):
 """ Benchmark a qrs detector against mitdb's records. Parameters detector : function The detector function. verbose : bool, optional The verbose option of the detector function. print_results : bool, optional Whether to print the overall performance, and the results for each record. Returns ------- comparitors : dictionary Dictionary of Comparitor objects run on the records, keyed on the record names. specificity : float Aggregate specificity. positive_predictivity : float Aggregate positive_predictivity. false_positive_rate : float Aggregate false_positive_rate. Notes ----- TODO: - remove non-qrs detections from reference annotations - allow kwargs Examples -------- >> from wfdb.processing import benchmark_mitdb, xqrs_detect """

    record_list = get_record_list('mitdb')
    n_records = len(record_list)

    # Function arguments for starmap
    args = zip(record_list, n_records * [detector], n_records * [verbose])

    # Run detector and compare against reference annotations for all
    # records
    with Pool(cpu_count() - 1) as p:
        comparitors = p.starmap(benchmark_mitdb_record, args)

    # Calculate aggregate stats
    specificity = np.mean([c.specificity for c in comparitors])
    positive_predictivity = np.mean(
        [c.positive_predictivity for c in comparitors])
    false_positive_rate = np.mean(
        [c.false_positive_rate for c in comparitors])

    comparitors = dict(zip(record_list, comparitors))

    print('Benchmark complete')

    if print_results:
        print('\nOverall MITDB Performance - Specificity: %.4f, Positive Predictivity: %.4f, False Positive Rate: %.4f\n'
              % (specificity, positive_predictivity, false_positive_rate))
        for record_name in record_list:
            print('Record %s:' % record_name)
            comparitors[record_name].print_summary()
            print('\n\n')

    return comparitors, specificity, positive_predictivity, false_positive_rate