code: def test_model_outputs_equivalence(self):
      (
          config,
          inputs_dict,
      ) = self.model_tester.prepare_config_and_inputs_for_common()
  
      def check_equivalence(
          model, tuple_inputs, dict_inputs, additional_kwargs={}
      ):
          tuple_output = model(
              **tuple_inputs, return_dict=False, **additional_kwargs
          )
          dict_output = model(
              **dict_inputs, return_dict=True, **additional_kwargs
          ).to_tuple()
  
          def recursive_check(tuple_object, dict_object):
              if isinstance(tuple_object, (List, Tuple)):
                  for tuple_iterable_value, dict_iterable_value in zip(
                      tuple_object, dict_object
                  ):
                      recursive_check(
                          tuple_iterable_value, dict_iterable_value
                      )
              elif tuple_object is None:
                  return
              else:
                  self.assert_almost_equals(
                      jnp.nan_to_num(tuple_object),
                      jnp.nan_to_num(dict_object),
                      1e-5,
                  )
  
          recursive_check(tuple_output, dict_output)
  
      for model_class in self.all_model_classes:
          model = model_class(config)
  
          tuple_inputs = self._prepare_for_class(
              inputs_dict, model_class
          )
          dict_inputs = self._prepare_for_class(
              inputs_dict, model_class
          )
          check_equivalence(model, tuple_inputs, dict_inputs)
  
          tuple_inputs = self._prepare_for_class(
              inputs_dict, model_class
          )
          dict_inputs = self._prepare_for_class(
              inputs_dict, model_class
          )
          check_equivalence(
              model,
              tuple_inputs,
              dict_inputs,
              {"output_hidden_states": True},
          )
  
imports: import copy
  import inspect
  import json
  import random
  import tempfile
  from typing import List, Tuple
  import numpy
  import transformers
  from transformers import is_flax_available, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import CaptureLogger, is_pt_flax_cross_test, require_flax, torch_device
  from transformers.utils import CONFIG_NAME, GENERATION_CONFIG_NAME, logging
  from transformers.utils.generic import ModelOutput
label_desc: Use image node_id 3 for calling the FlaxModelTesterMixin obj's underlying member method code with example usage: obj.test_model_outputs_equivalence() without return types