code: def test_constant_folding():
      m = pt.ones((1,), dtype="int8")
      l = pytensor.typed_list.make_list([m, m])
      f = pytensor.function([], l)
      topo = f.maker.fgraph.toposort()
      assert len(topo)
      assert isinstance(topo[0].op, pytensor.compile.ops.DeepCopyOp)
      assert f() == [1, 1]
  
file_path: pytensor/tests/typed_list/test_rewriting.py
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytensor.typed_list
  from pytensor.compile.io import In
  from pytensor.tensor.type import TensorType, matrix, scalar
  from pytensor.typed_list.basic import Append, Extend, Insert, Remove, Reverse
  from pytensor.typed_list.type import TypedListType
  from tests.tensor.utils import random_ranged
label_desc: Use image node_id 1 for calling a global function with example usage: test_constant_folding() without return types