def get_moya_interface(context, obj):
    """Get a Moya context interface, from an object if available"""
    if hasattr(obj, "__moyacontext__"):
        return obj.__moyacontext__(context)
    return obj