def ensure_point(geom):
 ensure_geometry(geom)
 if (geom.geom_type != u'Point'):
  raise SpatialError((u"Provided geometry '%s' is not a 'Point'." % geom))
 return geom

def ensure_point ( geom ) : ensure_geometry ( geom ) if ( geom . geom_type != u'Point' ) : raise SpatialError ( ( u"Provided geometry '%s' is not a 'Point'." % geom ) ) return geom
makes sure the parameter passed in looks like a geos point .