code: def test_local_reshape_dimshuffle():
      reshape_dimshuffle = out2in(local_reshape_dimshuffle)
  
      x = tensor.matrix("x")
  
      y = x.dimshuffle("x", 0, "x", 1)
      out = tensor.reshape(y, (1, x.shape[0] * x.shape[1], 1))
  
      g = FunctionGraph([x], [out])
      reshape_dimshuffle(g)
  
      topo = g.toposort()
      assert any([not isinstance(x, DimShuffle) for x in topo])
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  import theano
  from theano import function, config
  from theano import scalar
  from theano.gof import FunctionGraph
  from theano.gof.opt import out2in
  from theano.tensor.opt_uncanonicalize import local_alloc_dimshuffle, local_reshape_dimshuffle, local_dimshuffle_alloc, local_dimshuffle_subtensor
  import theano.tensor
  from theano.tensor.elemwise import CAReduce, Elemwise, DimShuffle
  from theano.tests import unittest_tools
label_desc: Use image node_id 2 for calling a global function with example usage: test_local_reshape_dimshuffle() without return types