class_docstr: A NodeVisitor specialized for constructing a libcudf expression tree.
  
  This visitor is designed to handle AST nodes that have libcudf equivalents.
  It constructs column references from names and literals from constants,
  then builds up operations. The final result can be accessed using the
  `expression` property. The visitor must be kept in scope for as long as the
  expression is needed because all of the underlying libcudf expressions will
  be destroyed when the libcudfASTVisitor is.
  
  Parameters
  ----------
  col_names : Tuple[str]
      The column names used to map the names in an expression.
class_docstr_tok: ["A","NodeVisitor","specialized","for","constructing","a","libcudf","expression","tree",".","This","visitor","is","designed","to","handle","AST","nodes","that","have","libcudf","equivalents",".","It","constructs","column","references","from","names","and","literals","from","constants",",","then","builds","up","operations",".","The","final","result","can","be","accessed","using","the","`","expression","`","property",".","The","visitor","must","be","kept","in","scope","for","as","long","as","the","expression","is","needed","because","all","of","the","underlying","libcudf","expressions","will","be","destroyed","when","the","libcudfASTVisitor","is",".","Parameters","--","--","--","--","--","col_names",":","Tuple","[","str","]","The","column","names","used","to","map","the","names","in","an","expression","."]
code: def visit_UnaryOp(self, node):
      self.visit(node.operand)
      self.nodes.append(self.stack.pop())
      if isinstance(node.op, ast.USub):
          # TODO: Except for leaf nodes, we won't know the type of the
          # operand, so there's no way to know whether this should be a float
          # or an int. We should maybe see what Spark does, and this will
          # probably require casting.
          self.nodes.append(Literal(-1))
          op = ASTOperator.MUL
          self.stack.append(
              Operation(op, self.nodes[-1], self.nodes[-2])
          )
      elif isinstance(node.op, ast.UAdd):
          self.stack.append(self.nodes[-1])
      else:
          op = python_cudf_operator_map[type(node.op)]
          self.stack.append(Operation(op, self.nodes[-1]))
  
file_path: cudf/python/cudf/cudf/core/_internals/expressions.py
imports: import ast
  import functools
  from typing import List, Tuple
  from cudf._lib.expressions import ASTOperator, ColumnReference, Expression, Literal, Operation
label_desc: Use image node_id 5 for calling the libcudfASTVisitor obj's underlying member method code with example usage: obj.visit_UnaryOp(node) without return types