class_docstr: Cover all the utilities involved to export ONNX models
class_docstr_tok: ["Cover","all","the","utilities","involved","to","export","ONNX","models"]
docstr: This test ensures we correctly flatten nested collection such as the one we use when returning past_keys.
  past_keys = Tuple[Tuple]
  
  ONNX exporter will export nested collections as ${collection_name}.${level_idx_0}.${level_idx_1}...${idx_n}
docstr_tok: ["This","test","ensures","we","correctly","flatten","nested","collection","such","as","the","one","we","use","when","returning","past_keys",".","past_keys","=","Tuple","[","Tuple","]","ONNX","exporter","will","export","nested","collections","as","$","{","collection_name","}",".","$","{","level_idx_0","}",".","$","{","level_idx_1","}","...","$","{","idx_n","}"]
code: def test_flatten_output_collection_property(self):
      """
      This test ensures we correctly flatten nested collection such as the one we use when returning past_keys.
      past_keys = Tuple[Tuple]
  
      ONNX exporter will export nested collections as ${collection_name}.${level_idx_0}.${level_idx_1}...${idx_n}
      """
      self.assertEqual(
          OnnxConfig.flatten_output_collection_property(
              "past_key", [[0], [1], [2]]
          ),
          {
              "past_key.0": 0,
              "past_key.1": 1,
              "past_key.2": 2,
          },
      )
  
imports: import os
  from pathlib import Path
  from tempfile import NamedTemporaryFile
  from unittest import TestCase
  from unittest.mock import patch
  import pytest
  from parameterized import parameterized
  from transformers import AutoConfig, PreTrainedTokenizerBase, is_tf_available, is_torch_available
  from transformers.onnx import EXTERNAL_DATA_FORMAT_SIZE_LIMIT, OnnxConfig, OnnxConfigWithPast, ParameterFormat, export, validate_model_outputs
  from transformers.onnx.utils import compute_effective_axis_dimension, compute_serialized_parameters_size, get_preprocessor
  from transformers.testing_utils import require_onnx, require_rjieba, require_tf, require_torch, require_vision, slow
label_desc: Use image node_id 4 for calling the OnnxUtilsTestCaseV2 obj's underlying member method code with example usage: obj.test_flatten_output_collection_property() without return types