'Recursively evaluate the given ast.Node.
Uses self.binary_ops and self.unary_ops for the implementation.
A subclass could overwrite this to handle more nodes, calling it only
for nodes it does not implement it self.
Raises:
ExpressionEvaluator.Error: If it can\'t handle the ast.Node.'

def _eval_node(self, node, timeout):

    if isinstance(node, ast.Num):
        return node.n
    elif (isinstance(node, ast.BinOp) and (type(node.op) in self.binary_ops)):
        left = self._eval_node(node.left, timeout)
        right = self._eval_node(node.right, timeout)
        if (time.time() > timeout):
            raise ExpressionEvaluator.Error(u'Time    for    evaluating    expression    ran    out.')
        return self.binary_ops[type(node.op)](left, right)
    elif (isinstance(node, ast.UnaryOp) and (type(node.op) in self.unary_ops)):
        operand = self._eval_node(node.operand, timeout)
        if (time.time() > timeout):
            raise ExpressionEvaluator.Error(u'Time    for    evaluating    expression    ran    out.')
        return self.unary_ops[type(node.op)](operand)
    raise ExpressionEvaluator.Error((u"Ast.Node    '%s'    not    implemented." % (type(node).__name__,)))
