def _match_data_sets(x,y):
<EOL>if x is None: <EOL><INDENT>if _fun.is_iterable(y[<NUM_LIT:0>]):<EOL><INDENT>x = []<EOL>for n in range(len(y)):<EOL><INDENT>x.append(list(range(len(y[n]))))<EOL><DEDENT><DEDENT>else: x = list(range(len(y)))<EOL><DEDENT>if y is None: <EOL><INDENT>if _fun.is_iterable(x[<NUM_LIT:0>]):<EOL><INDENT>y = []<EOL>for n in range(len(x)):<EOL><INDENT>y.append(list(range(len(x[n]))))<EOL><DEDENT><DEDENT>else: y = list(range(len(x)))<EOL><DEDENT>if _fun.elements_are_numbers(x) and _fun.elements_are_numbers(y):<EOL><INDENT>x = [x]<EOL>y = [y]<EOL><DEDENT>if _fun.elements_are_numbers(x) and not _fun.elements_are_numbers(y): x = [x]*len(y)<EOL>if _fun.elements_are_numbers(y) and not _fun.elements_are_numbers(x): y = [y]*len(x)<EOL>for n in range(len(x)):<EOL><INDENT>if x[n] is None: x[n] = list(range(len(y[n])))<EOL>if y[n] is None: y[n] = list(range(len(x[n])))<EOL><DEDENT>return x, y<EOL>
Makes sure everything is the same shape. "Intelligently".