code: def parse_feature(obj):
      
  
      # object implementing geo_interface
      if hasattr(obj, '__geo_interface__'):
          gi = obj.__geo_interface__
          if gi['type'] in geom_types:
              return wrap_geom(gi)
          elif gi['type'] == 'Feature':
              return gi
  
      # wkt
      try:
          shape = wkt.loads(obj)
          return wrap_geom(shape.__geo_interface__)
      except (ReadingError, TypeError, AttributeError):
          pass
  
      # wkb
      try:
          shape = wkb.loads(obj)
          return wrap_geom(shape.__geo_interface__)
      except (ReadingError, TypeError):
          pass
  
      # geojson-like python mapping
      try:
          if obj['type'] in geom_types:
              return wrap_geom(obj)
          elif obj['type'] == 'Feature':
              return obj
      except (AssertionError, TypeError):
          pass
  
      raise ValueError("Can't parse %s as a geojson Feature object" % obj)
docs: Given a python object
      attemp to a GeoJSON-like Feature from it