<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compare_disks(disk0, disk1, configuration):
 """Compares two disks according to the given configuration."""

    with DiskComparator(disk0, disk1) as comparator:
        results = comparator.compare(
            size=configuration.get('get_file_size', False),
            identify=configuration.get('identify_files', False),
            concurrent=configuration.get('use_concurrency', False))

        if configuration.get('extract_files', False):
            extract = results['created_files'] + results['modified_files']
            files = comparator.extract(1, extract,
                                       path=configuration['results_folder'])

            results.update(files)

        if configuration.get('compare_registries', False):
            results['registry'] = comparator.compare_registry(
                concurrent=configuration.get('use_concurrency', False))

    return results