code: def test_extract_imports_absolute(self):
      with tempfile.TemporaryDirectory() as tmp_folder:
          tmp_folder = Path(tmp_folder)
          create_tmp_repo(tmp_folder)
  
          with open(tmp_folder / BERT_MODELING_FILE, "w") as f:
              f.write(
                  "from transformers.utils import cached_file, is_torch_available\nfrom transformers.models.bert.configuration_bert import BertConfig\n"
              )
          expected_bert_imports = [
              (
                  "src/transformers/utils/__init__.py",
                  ["cached_file", "is_torch_available"],
              ),
              (
                  "src/transformers/models/bert/configuration_bert.py",
                  ["BertConfig"],
              ),
          ]
          with patch_transformer_repo_path(tmp_folder):
              assert (
                  extract_imports(BERT_MODELING_FILE)
                  == expected_bert_imports
              )
  
          # Test with multi-line imports
          with open(tmp_folder / BERT_MODELING_FILE, "w") as f:
              f.write(
                  "from transformers.utils import (\n    cached_file,\n    is_torch_available\n)\nfrom transformers.models.bert.configuration_bert import BertConfig\n"
              )
          expected_bert_imports = [
              (
                  "src/transformers/models/bert/configuration_bert.py",
                  ["BertConfig"],
              ),
              (
                  "src/transformers/utils/__init__.py",
                  ["cached_file", "is_torch_available"],
              ),
          ]
          with patch_transformer_repo_path(tmp_folder):
              assert (
                  extract_imports(BERT_MODELING_FILE)
                  == expected_bert_imports
              )
  
          # Test with base imports
          with open(tmp_folder / BERT_MODELING_FILE, "w") as f:
              f.write(
                  "from transformers.utils import (\n    cached_file,\n    is_torch_available\n)\nfrom transformers import BertConfig\n"
              )
          expected_bert_imports = [
              ("src/transformers/__init__.py", ["BertConfig"]),
              (
                  "src/transformers/utils/__init__.py",
                  ["cached_file", "is_torch_available"],
              ),
          ]
          with patch_transformer_repo_path(tmp_folder):
              assert (
                  extract_imports(BERT_MODELING_FILE)
                  == expected_bert_imports
              )
  
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 8 for calling the TestFetcherTester obj's underlying member method code with example usage: obj.test_extract_imports_absolute() without return types