code: def test_infer_tests_to_run_with_examples_modifs(self):
      with tempfile.TemporaryDirectory() as tmp_folder:
          tmp_folder = Path(tmp_folder)
          models = ["bert", "gpt2"]
          repo = create_tmp_repo(tmp_folder, models=models)
  
          # Modification in one example trigger the corresponding test
          commit_changes(
              "examples/pytorch/text-classification/run_glue.py",
              "from transformers import BertModeln\n\ncode1",
              repo,
          )
  
          with patch_transformer_repo_path(tmp_folder):
              infer_tests_to_run(
                  tmp_folder / "test-output.txt",
                  diff_with_last_commit=True,
              )
              with open(
                  tmp_folder / "examples_test_list.txt", "r"
              ) as f:
                  example_tests_to_run = f.read()
  
          assert (
              example_tests_to_run
              == "examples/pytorch/test_pytorch_examples.py"
          )
  
          # Modification in one test example file trigger that test
          repo = create_tmp_repo(tmp_folder, models=models)
          commit_changes(
              "examples/pytorch/test_pytorch_examples.py",
              """test_args = "run_glue.py"\nmore_code""",
              repo,
          )
  
          with patch_transformer_repo_path(tmp_folder):
              infer_tests_to_run(
                  tmp_folder / "test-output.txt",
                  diff_with_last_commit=True,
              )
              with open(
                  tmp_folder / "examples_test_list.txt", "r"
              ) as f:
                  example_tests_to_run = f.read()
  
          assert (
              example_tests_to_run
              == "examples/pytorch/test_pytorch_examples.py"
          )
  
imports: import os
  import shutil
  import sys
  import tempfile
  import unittest
  from contextlib import contextmanager
  from pathlib import Path
  from git import Repo
  from transformers.testing_utils import CaptureStdout
  import tests_fetcher
  from tests_fetcher import checkout_commit, clean_code, create_module_to_test_map, create_reverse_dependency_map, create_reverse_dependency_tree, diff_is_docstring_only, extract_imports, get_all_tests, get_diff, get_module_dependencies, get_tree_starting_at, infer_tests_to_run, init_test_examples_dependencies, parse_commit_message, print_tree_deps_of
label_desc: Use image node_id 18 for calling the TestFetcherTester obj's underlying member method code with example usage: obj.test_infer_tests_to_run_with_examples_modifs() without return types