def check_result(func,**kwargs):
    """
    wrap calls to sheep-server API, check return code, and return response content
    """
    response = func(**kwargs)
    if response["status_code"] != 200:
        print(response["content"])
        raise RuntimeError("Error in call to sheep-server")
    return response["content"]