def _get_cols(special_col_names, cols, patch):
<EOL>if not cols:<EOL><INDENT>if '<STR_LIT>' in list(patch.meta['<STR_LIT>'].keys()):<EOL><INDENT>cols = patch.meta['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>raise NameError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>cols = cols.replace('<STR_LIT:U+0020>', '<STR_LIT>')<EOL>col_list = cols.split('<STR_LIT:;>')<EOL>col_dict = {x.split('<STR_LIT::>')[<NUM_LIT:0>]: x.split('<STR_LIT::>')[<NUM_LIT:1>] for x in col_list}<EOL>result = []<EOL>for special_col_name in special_col_names:<EOL><INDENT>col_name = col_dict.get(special_col_name, None)<EOL>if special_col_name is '<STR_LIT>' and col_name is None:<EOL><INDENT>col_name = '<STR_LIT:count>'<EOL>patch.table['<STR_LIT:count>'] = np.ones(len(patch.table))<EOL><DEDENT>if col_name is None:<EOL><INDENT>raise ValueError("<STR_LIT>" %<EOL>special_col_name)<EOL><DEDENT>result.append(col_name)<EOL><DEDENT>return tuple(result), patch<EOL>
Retrieve values of special_cols from cols string or patch metadata