def _geo_to_feature(ob):
mapping = ob.__geo_interface__<EOL>if mapping['<STR_LIT:type>'] == '<STR_LIT>':<EOL><INDENT>return mapping<EOL><DEDENT>else:<EOL><INDENT>return {'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT>': mapping}<EOL><DEDENT>
Return a GeoJSON Feature from an object that implements
__geo_interface__

If the object's type is a geometry, return a Feature with empty
properties and the object's mapping as the feature geometry. If the
object's type is a Feature, then return it.