def METHOD_NAME(dummy_3d_mask_nib, dummy_3d_pmj_label, tmp_path):
    """ Run sct_process_segmentation with -pmj, -perslice and check the results"""
    filename = str(tmp_path / 'tmp_file_out.csv')
    sct_process_segmentation.main(argv=['-i', dummy_3d_mask_nib, '-pmj', dummy_3d_pmj_label,
                                        '-perslice', '1', '-o', filename])
    with open(filename, "r") as csvfile:
        reader = csv.DictReader(csvfile, delimiter=',')
        rows = list(reader)
        row = rows[10]
        assert row['Slice (I->S)'] == '10'
        assert row['DistancePMJ'] == '18.11'
        assert row['VertLevel'] == ''
        assert row['SUM(length)'] == '1.0'