def METHOD_NAME(obj):
    """getPublicObject(obj) ... returns the object which should be used to reference a feature of the given object."""
    if hasattr(obj, "getParentGeoFeatureGroup"):
        body = obj.getParentGeoFeatureGroup()
        if body:
            return METHOD_NAME(body)
    return obj