code: def test_from_pretrained_save_pretrained(self):
      (
          config,
          inputs_dict,
      ) = self.model_tester.prepare_config_and_inputs_for_common()
  
      for model_class in self.all_model_classes:
          with self.subTest(model_class.__name__):
              model = model_class(config)
  
              prepared_inputs_dict = self._prepare_for_class(
                  inputs_dict, model_class
              )
              outputs = model(**prepared_inputs_dict).to_tuple()
  
              # verify that normal save_pretrained works as expected
              with tempfile.TemporaryDirectory() as tmpdirname:
                  model.save_pretrained(tmpdirname)
                  model_loaded = model_class.from_pretrained(tmpdirname)
  
              outputs_loaded = model_loaded(
                  **prepared_inputs_dict
              ).to_tuple()
              for output_loaded, output in zip(outputs_loaded, outputs):
                  self.assert_almost_equals(output_loaded, output, 1e-3)
  
              # verify that save_pretrained for distributed training
              # with `params=params` works as expected
              with tempfile.TemporaryDirectory() as tmpdirname:
                  model.save_pretrained(tmpdirname, params=model.params)
                  model_loaded = model_class.from_pretrained(tmpdirname)
  
              outputs_loaded = model_loaded(
                  **prepared_inputs_dict
              ).to_tuple()
              for output_loaded, output in zip(outputs_loaded, outputs):
                  self.assert_almost_equals(output_loaded, output, 1e-3)
  
imports: import copy
  import inspect
  import json
  import random
  import tempfile
  import unittest
  from typing import List, Tuple
  import numpy
  import transformers
  from huggingface_hub import HfFolder, delete_repo, set_access_token
  from requests.exceptions import HTTPError
  from transformers import BertConfig, is_flax_available, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import TOKEN, USER, CaptureLogger, is_pt_flax_cross_test, is_staging_test, require_flax, torch_device
  from transformers.utils import logging
  from transformers.utils.generic import ModelOutput
label_desc: Use image node_id 7 for calling the FlaxModelTesterMixin obj's underlying member method code with example usage: obj.test_from_pretrained_save_pretrained() without return types