code: def test_optimization_max(self):
      data = np.asarray(np.random.rand(2, 3), dtype=config.floatX)
      n = tensor.matrix()
  
      for axis in [0, 1, -1]:
          f = function([n], tensor.max(n, axis), mode=self.mode)
          topo = f.maker.fgraph.toposort()
          assert len(topo) == 1
          assert isinstance(topo[0].op, CAReduce)
          f(data)
  
          f = function([n], tensor.max(-n, axis), mode=self.mode)
          topo = f.maker.fgraph.toposort()
          assert len(topo) == 2
          assert isinstance(topo[0].op, Elemwise)
          assert isinstance(topo[0].op.scalar_op, scalar.Neg)
          assert isinstance(topo[1].op, CAReduce)
          f(data)
  
          f = function([n], -tensor.max(n, axis), mode=self.mode)
          topo = f.maker.fgraph.toposort()
          assert len(topo) == 2
          assert isinstance(topo[0].op, CAReduce)
          assert isinstance(topo[1].op, Elemwise)
          assert isinstance(topo[1].op.scalar_op, scalar.Neg)
          f(data)
  
          f = function([n], -tensor.max(-n, axis), mode=self.mode)
          topo = f.maker.fgraph.toposort()
          assert len(topo) == 1
          assert isinstance(topo[0].op, CAReduce)  # min
          f(data)
  
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 the T_min_max obj's underlying member method code with example usage: obj.test_optimization_max() without return types