def _homogenize_data_filter(dfilter):
if isinstance(dfilter, tuple) and (len(dfilter) == <NUM_LIT:1>):<EOL><INDENT>dfilter = (dfilter[<NUM_LIT:0>], None)<EOL><DEDENT>if (dfilter is None) or (dfilter == (None, None)) or (dfilter == (None,)):<EOL><INDENT>dfilter = (None, None)<EOL><DEDENT>elif isinstance(dfilter, dict):<EOL><INDENT>dfilter = (dfilter, None)<EOL><DEDENT>elif isinstance(dfilter, (str, list)) or (<EOL>isinstance(dfilter, int) and (not isinstance(dfilter, bool))<EOL>):<EOL><INDENT>dfilter = (None, dfilter if isinstance(dfilter, list) else [dfilter])<EOL><DEDENT>elif isinstance(dfilter[<NUM_LIT:0>], dict) or (<EOL>(dfilter[<NUM_LIT:0>] is None) and (not isinstance(dfilter[<NUM_LIT:1>], dict))<EOL>):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>dfilter = (dfilter[<NUM_LIT:1>], dfilter[<NUM_LIT:0>])<EOL><DEDENT>return dfilter<EOL>
Make data filter definition consistent.

Create a tuple where first element is the row filter and the second element
is the column filter