Does all of the processing required to create a bundle and write it to disk, returning its hash version

def make_bundle(bundle, fixed_version=None):
    """
    Does all of the processing required to create a bundle and write it to disk, returning its hash version
    """
    tmp_output_file_name = '%s.%s.%s' % (os.path.join(bundle.bundle_file_root, bundle.bundle_filename), 'temp', bundle.bundle_type)

    iter_input = iter_bundle_files(bundle)

    output_pipeline = processor_pipeline(bundle.processors, iter_input)

    m = md5()

    with open(tmp_output_file_name, 'wb') as output_file:
        for chunk in output_pipeline:
            m.update(chunk)
            output_file.write(chunk)

    hash_version = fixed_version or m.hexdigest()

    output_file_name = bundle.get_path(hash_version)

    os.rename(tmp_output_file_name, output_file_name)

    return hash_version