def METHOD_NAME(file):
    from .prepare_data_utils import extract_slices
    logger.debug(f"  Processing of {file}.")
    container = container_from_filename(file)
    subfolder = "slice_based"
    output_mode = extract_slices(
        Path(file),
        slice_direction=parameters["slice_direction"],
        slice_mode=parameters["slice_mode"],
        discarded_slices=parameters["discarded_slices"],
    )
    logger.debug(f"    {len(output_mode)} slices extracted.")
    write_output_imgs(output_mode, container, subfolder)