code: def as_int_none_variable(x):
      if x is None:
          return NoneConst
      elif NoneConst.equals(x):
          return x
      x = theano.tensor.as_tensor_variable(x, ndim=0)
      if x.type.dtype not in theano.tensor.integer_dtypes:
          raise TypeError("index must be integers")
      return x
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.gof import Apply, Constant, Generic, Op, Type, hashtype
  from theano.gradient import DisconnectedType
label_desc: Use image node_id 1 for calling a global function with example usage: as_int_none_variable(x) and returns: x, NoneConst, x