code: def test_local_gpua_advanced_incsubtensor():
      # test a corner case reported at gh-5589
      target = tensor.ftensor4()
      y = target.dimshuffle(1, 0, 2, 3).flatten(ndim=1)
      w = tensor.ones_like(y)
      w = tensor.set_subtensor(w[tensor.eq(y, 1.0).nonzero()], 100)
      w = tensor.set_subtensor(w[tensor.eq(y, -1.0).nonzero()], 0)
      f = theano.function([target], w)
      assert _check_stack_trace(f)
  
imports: from __future__ import absolute_import, print_function, division
  from nose.tools import assert_raises
  import numpy
  import theano
  from theano import tensor
  import theano.tensor.slinalg
  from theano.tests.breakpoint import PdbBreakpoint
  from theano.tests import unittest_tools, test_ifelse
  from theano.tensor.tests import test_basic
  from theano.gof.opt import check_stack_trace
  import theano.gpuarray
  from ..None import basic_ops
  from ..type import GpuArrayType, gpuarray_shared_constructor, get_context
  from ..basic_ops import GpuAlloc, GpuAllocEmpty, GpuReshape, GpuFromHost, HostFromGpu, host_from_gpu
  from ..blas import GpuGemm
  from ..elemwise import GpuCAReduceCuda, GpuCAReduceCPY, GpuElemwise, Elemwise, max_inputs_to_GpuElemwise
  from ..dnn import GpuDnnReduction
  from ..subtensor import GpuSubtensor
  from ..linalg import GpuCusolverSolve, cusolver_available, GpuCholesky
  from .config import mode_with_gpu, mode_without_gpu, test_ctx_name, SkipTest
  import unittest
  from theano.tensor.nnet import abstract_conv
  from theano.gpuarray import dnn, blas, opt
label_desc: Use image node_id 26 for calling a global function with example usage: test_local_gpua_advanced_incsubtensor() without return types