code: def test_replace_func_collection_return(tmpdir, return_type):
      path = str(tmpdir)
  
      class Model(chainer.Chain):
          def __init__(self, return_type):
              super().__init__()
              self.return_type = return_type
  
          def tiled_array(self, xs, n=5):
              if self.return_type == "list":
                  return [xs.array * i for i in range(1, 1 + n)]
              else:
                  assert self.return_type == "dict"
                  return {str(i): xs.array * i for i in range(1, 1 + n)}
  
          def __call__(self, xs):
              return self.tiled_array(xs)
  
      model = Model(return_type)
      x = input_generator.increasing(1, 5)
  
      with warnings.catch_warnings(record=True):
          model.tiled_array = fake_as_funcnode(
              model.tiled_array, "xTiledArray"
          )
  
      def tiled_array_converter(params):
          return (
              onnx_helper.make_node(
                  "xTiledArray", params.input_names, params.output_names
              ),
          )
  
      addon_converters = {"xTiledArray": tiled_array_converter}
  
      with testing.assert_warns(UserWarning):
          export_testcase(
              model, x, path, external_converters=addon_converters
          )
  
      model_filepath = os.path.join(path, "model.onnx")
      assert os.path.isfile(model_filepath)
  
      onnx_model = onnx.load(model_filepath)
      node_names = [n.name for n in onnx_model.graph.node]
      assert len(node_names) == 1
      assert node_names[0] == "xTiledArray_0"
      output_names = [n.name for n in onnx_model.graph.output]
      assert len(output_names) == 5
      for i, name in enumerate(output_names):
          assert name == "xTiledArray_0_{:d}".format(i)
  
imports: import os
  import warnings
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import testing
  import numpy
  import onnx
  import pytest
  from onnx_chainer import export
  from onnx_chainer import export_testcase
  from onnx_chainer import onnx_helper
  from onnx_chainer.replace_func import as_funcnode
  from onnx_chainer.replace_func import fake_as_funcnode
  from onnx_chainer.testing import input_generator
  from onnx_chainer_tests.helper import ONNXModelChecker
  from onnx_chainer_tests.helper import ONNXModelTest
label_desc: Use image node_id 2 for calling a global function with example usage: test_replace_func_collection_return(tmpdir, return_type) and returns: onnx_helper, self, unknown, unknown