code: def _test_export(
      self, model, framework, opset, tokenizer=None, **model_kwargs
  ):
      try:
          # Compute path
          with TemporaryDirectory() as tempdir:
              path = Path(tempdir).joinpath("model.onnx")
  
          # Remove folder if exists
          if path.parent.exists():
              path.parent.rmdir()
  
          # Export
          convert(
              framework, model, path, opset, tokenizer, **model_kwargs
          )
  
          return path
      except Exception as e:
          self.fail(e)
  
imports: import unittest
  from pathlib import Path
  from tempfile import NamedTemporaryFile, TemporaryDirectory
  from transformers import BertConfig, BertTokenizerFast, FeatureExtractionPipeline
  from transformers.convert_graph_to_onnx import convert, ensure_valid_input, generate_identified_filename, infer_shapes, quantize
  from transformers.testing_utils import require_tf, require_tokenizers, require_torch, slow
label_desc: Use image node_id 6 for calling the OnnxExportTestCase obj's underlying member method code with example usage: obj._test_export(model, framework, opset, tokenizer) and returns: path