def coords(obj):
<EOL>if '<STR_LIT>' in obj:<EOL><INDENT>for f in obj['<STR_LIT>']:<EOL><INDENT>for c in coords(f):<EOL><INDENT>yield c<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if isinstance(obj, (tuple, list)):<EOL><INDENT>coordinates = obj<EOL><DEDENT>elif '<STR_LIT>' in obj:<EOL><INDENT>coordinates = obj['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>coordinates = obj.get('<STR_LIT>', obj)<EOL><DEDENT>for e in coordinates:<EOL><INDENT>if isinstance(e, (float, int)):<EOL><INDENT>yield tuple(coordinates)<EOL>break<EOL><DEDENT>for f in coords(e):<EOL><INDENT>yield f<EOL><DEDENT><DEDENT><DEDENT>
Yields the coordinates from a Feature or Geometry.

:param obj: A geometry or feature to extract the coordinates from.
:type obj: Feature, Geometry
:return: A generator with coordinate tuples from the geometry or feature.
:rtype: generator