code: def test_true_div(self):
      # true_div's upcast policy is not exactly "upgrade_to_float",
      # so the test is a little bit different
      x_range = list(range(-127, 128))
      y_range = list(range(-127, 0)) + list(range(1, 127))
  
      xi = int8("xi")
      yi = int8("yi")
      xf = Scalar(theano.config.floatX)("xf")
      yf = Scalar(theano.config.floatX)("yf")
  
      ei = true_div(xi, yi)
      fi = theano.function([xi, yi], ei)
  
      ef = true_div(xf, yf)
      ff = theano.function([xf, yf], ef)
  
      for x_val in x_range:
          for y_val in y_range:
              outi = fi(x_val, y_val)
              outf = ff(x_val, y_val)
  
              assert outi.dtype == outf.dtype, "incorrect dtype"
              assert np.allclose(outi, outf), "insufficient precision"
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  import theano
  from theano.gof import FunctionGraph
  from theano import gof
  from theano.tests import unittest_tools
  from theano.scalar.basic import floats, float16, float32, float64, ints, int8, int32, complex64, uint8, ComplexError, IntDiv, TrueDiv, Composite, add, div_proxy, and_, eq, neq, invert, mul, Scalar, InRange, cast, constant, switch
  from theano.scalar.basic import true_div, inv, log, log2, log10, log1p, exp, exp2, expm1, sqrt, deg2rad, rad2deg, cos, arccos, sin, arcsin, tan, arctan, arctan2, cosh, arccosh, sinh, arcsinh, tanh, arctanh
label_desc: Use image node_id 3 for calling the test_upgrade_to_float obj's underlying member method code with example usage: obj.test_true_div() without return types