def METHOD_NAME(request):
    rpc_endpoint = request.config.option.vineyard_endpoint
    if rpc_endpoint is not None:
        return vineyard.connect(endpoint=tuple(rpc_endpoint.split(':')))
    else:
        return None