code: def test_feat_extract_from_and_save_pretrained(self):
      feat_extract_first = self.feature_extraction_class(
          **self.feat_extract_dict
      )
  
      with tempfile.TemporaryDirectory() as tmpdirname:
          saved_file = feat_extract_first.save_pretrained(tmpdirname)[0]
          check_json_file_has_correct_format(saved_file)
          feat_extract_second = (
              self.feature_extraction_class.from_pretrained(tmpdirname)
          )
  
      self.assertEqual(
          feat_extract_second.to_dict(), feat_extract_first.to_dict()
      )
  
imports: import json
  import os
  import sys
  import tempfile
  import unittest
  import unittest.mock
  from pathlib import Path
  from huggingface_hub import HfFolder, delete_repo, set_access_token
  from requests.exceptions import HTTPError
  from transformers import AutoFeatureExtractor, Wav2Vec2FeatureExtractor
  from transformers.testing_utils import TOKEN, USER, check_json_file_has_correct_format, get_tests_dir, is_staging_test
  from transformers.utils import is_torch_available, is_vision_available
  from test_module.custom_feature_extraction import CustomFeatureExtractor
label_desc: Use image node_id 3 for calling the FeatureExtractionSavingTestMixin obj's underlying member method code with example usage: obj.test_feat_extract_from_and_save_pretrained() without return types