def multipart_to_singleparts(geom):
if isinstance(geom, base.BaseGeometry):<EOL><INDENT>if hasattr(geom, "<STR_LIT>"):<EOL><INDENT>for subgeom in geom:<EOL><INDENT>yield subgeom<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield geom<EOL><DEDENT><DEDENT>
Yield single part geometries if geom is multipart, otherwise yield geom.

Parameters:
-----------
geom : shapely geometry

Returns:
--------
shapely single part geometries