<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def xpathNodeEval(self, str, ctx):
 """Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored. """

        if ctx is None: ctx__o = None
        else: ctx__o = ctx._o
        ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
        if ret is None:raise xpathError('xmlXPathNodeEval() failed')
        return xpathObjectRet(ret)