def METHOD_NAME(backend, source_directory, compressor, target_size_mb):
    meta_data = backend.get_metadata(source_directory)
    old_compressor = meta_data['compressor']
    if compressor is not None:
        meta_data['compressor'] = compressor
    if target_size_mb is not None:
        meta_data['chunk_target_size_mb'] = target_size_mb
    return meta_data, old_compressor