def METHOD_NAME(bytes_io, output_folder_name):
    with ZipFile(bytes_io) as zf:
        if output_folder_name:
            os.makedirs(output_folder_name, exist_ok=True)
            zf.extractall(output_folder_name)
            os.remove(os.path.join(output_folder_name, 'metadata_v0.json'))
            os.rename(
                os.path.join(output_folder_name, 'metadata_v1.json'),
                os.path.join(output_folder_name, METADATA_FILENAME)
            )
        else:
            in_memory_directory = {}
            for name in zf.namelist():
                in_memory_directory[name] = zf.read(name)
            return in_memory_directory