code: def is_positive(v):
      if hints(v).get("positive", False):
          return True
      # TODO: how to handle this - a registry?
      #      infer_hints on Ops?
      logger.debug("is_positive: %s" % str(v))
      if v.owner and v.owner.op == tensor.pow:
          try:
              exponent = tensor.get_scalar_constant_value(
                  v.owner.inputs[1]
              )
          except tensor.basic.NotScalarConstantError:
              return False
          if 0 == exponent % 2:
              return True
      return False
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  from six import iteritems, integer_types
  from six.moves import xrange
  from theano.gof import Op, Apply
  from theano.tensor import DimShuffle, Dot
  from theano.tensor.blas import Dot22
  from theano import tensor
  import theano.tensor
  from theano.tensor.opt import register_stabilize, register_specialize, register_canonicalize
  from theano.gof import local_optimizer
  from theano.gof.opt import Optimizer
  from theano.tensor.nlinalg import MatrixInverse, matrix_inverse, extract_diag, trace, det
  from theano.tensor.slinalg import Cholesky, cholesky, Solve, solve, imported_scipy
label_desc: Use image node_id 7 for calling a global function with example usage: is_positive(v) and returns: False, True, True, False