code: def test_local_reshape_lift():
      x = tensor4()
      out = exp(x).reshape([x.size])
      assert out.ndim == 1
      mode = get_default_mode()
      mode = mode.including("local_reshape_lift")
      f = function([x], out, mode=mode)
      f(np.random.random((5, 4, 3, 2)).astype(config.floatX))
      topo = f.maker.fgraph.toposort()
      assert isinstance(topo[-2].op, Reshape)
      assert isinstance(topo[-1].op, Elemwise)
      assert check_stack_trace(f, ops_to_check="last")
  
imports: import copy
  import numpy
  import pytest
  import pytensor.tensor
  from pytensor import shared
  from pytensor.compile.function import function
  from pytensor.compile.mode import get_default_mode, get_mode
  from pytensor.compile.ops import deep_copy_op
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable, equal_computations
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import Op
  from pytensor.graph.rewriting.basic import check_stack_trace, node_rewriter, out2in
  from pytensor.graph.rewriting.utils import rewrite_graph
  from pytensor.graph.type import Type
  from pytensor.tensor.basic import alloc, as_tensor_variable
  from pytensor.tensor.elemwise import DimShuffle, Elemwise
  from pytensor.tensor.math import add, exp, maximum
  from pytensor.tensor.rewriting.basic import register_specialize
  from pytensor.tensor.rewriting.shape import ShapeFeature, local_reshape_to_dimshuffle, local_useless_reshape
  from pytensor.tensor.shape import Reshape, Shape_i, SpecifyShape, reshape, shape, specify_shape
  from pytensor.tensor.subtensor import set_subtensor
  from pytensor.tensor.type import fmatrix, iscalar, lscalar, matrix, scalar, tensor, tensor3, tensor4, vector
  from tests import unittest_tools
label_desc: Use image node_id 1 for calling a global function with example usage: test_local_reshape_lift() without return types