code: def test_feat_extract_to_json_file(self):
      feat_extract_first = self.feature_extraction_class(
          **self.feat_extract_dict
      )
  
      with tempfile.TemporaryDirectory() as tmpdirname:
          json_file_path = os.path.join(tmpdirname, "feat_extract.json")
          feat_extract_first.to_json_file(json_file_path)
          feat_extract_second = (
              self.feature_extraction_class.from_json_file(
                  json_file_path
              )
          )
  
      self.assertEqual(
          feat_extract_second.to_dict(), feat_extract_first.to_dict()
      )
  
file_path: transformers/tests/test_feature_extraction_common.py
imports: import json
  import os
  import tempfile
  from transformers.testing_utils import check_json_file_has_correct_format
label_desc: Use image node_id 2 for calling the FeatureExtractionSavingTestMixin obj's underlying member method code with example usage: obj.test_feat_extract_to_json_file() without return types