code: def test_adt_list():
      mod = tvm.IRModule()
      p = Prelude(mod)
      _, cons, nil = mod.get_type("List")
      l1 = cons(relay.const(1), nil())
      l21 = cons(relay.const(2), l1)
      l321 = cons(relay.const(3), l21)
  
      f = relay.Function([], l321)
      mod["main"] = f
  
      result = get_serialized_output(mod)
      assert len(result) == 2
      assert len(result[1]) == 2
      assert len(result[1][1]) == 2
      res = []
      res.append(result[0].numpy().tolist())
      res.append(result[1][0].numpy().tolist())
      res.append(result[1][1][0].numpy().tolist())
      tvm.testing.assert_allclose(res, np.array([3, 2, 1]))
  
imports: import pytest
  import numpy
  import tvm
  from tvm.runtime import vm
  from tvm.relay import vm
  from tvm import relay
  from tvm.relay.scope_builder import ScopeBuilder
  from tvm.relay import transform
  from tvm.relay.prelude import Prelude
  from tvm.contrib import utils
  from tvm.relay import testing
label_desc: Use image node_id 10 for calling a global function with example usage: test_adt_list() without return types