def iter_points(x):
if not isinstance(x, (list, tuple)):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(x))<EOL><DEDENT>if len(x):<EOL><INDENT>if isinstance(x[<NUM_LIT:0>], (list, tuple)):<EOL><INDENT>out = []<EOL>for y in x:<EOL><INDENT>out += iter_points(y)<EOL><DEDENT>return out<EOL><DEDENT>else:<EOL><INDENT>return [x]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Iterates over a list representing a feature, and returns a list of points,
    whatever the shape of the array (Point, MultiPolyline, etc).