def _truediv_python3(x, y, name=None):
    with ops.name_scope(name, 'truediv', [x, y]) as name:
        x = ops.convert_to_tensor(x, name='x')
        y = ops.convert_to_tensor(y, name='y')
        x_dtype = x.dtype.base_dtype
        y_dtype = y.dtype.base_dtype
        if (x_dtype != y_dtype):
            raise TypeError(('x and y must have the same dtype, got %r != %r' % (x_dtype, y_dtype)))
        try:
            dtype = _TRUEDIV_TABLE[x_dtype]
        except KeyError:
            raise TypeError(('Invalid dtype %r in __truediv__' % x_dtype))
        if (dtype is not None):
            x = cast(x, dtype)
            y = cast(y, dtype)
        return gen_math_ops.real_div(x, y, name=name)
def _truediv_python3(x, y, name=None):
    with ops.name_scope(name, 'truediv', [x, y]) as name:
        x = ops.convert_to_tensor(x, name='x')
        y = ops.convert_to_tensor(y, name='y')
        x_dtype = x.dtype.base_dtype
        y_dtype = y.dtype.base_dtype
        if (x_dtype != y_dtype):
            raise TypeError(('x and y must have the same dtype, got %r != %r' % (x_dtype, y_dtype)))
        try:
            dtype = _TRUEDIV_TABLE[x_dtype]
        except KeyError:
            raise TypeError(('Invalid dtype %r in __truediv__' % x_dtype))
        if (dtype is not None):
            x = cast(x, dtype)
            y = cast(y, dtype)
        return gen_math_ops.real_div(x, y, name=name)