code: def _create_test_gitrepo(temp_dir):
      repo = GitRepo(temp_dir)
      repo.init()
      repo.call_git(["add", "."])
      repo.call_git(["commit", "-m", "test commit"])
  
      hash_keys = tuple(
          repo.call_git(["hash-object", file_name]).strip()
          for file_name in ("file1", "file2")
      )
      return repo, hash_keys
  
imports: import logging
  import os
  import os.path
  import sys
  from datalad.dataset.gitrepo import GitRepo, _get_dot_git
  from datalad.support.exceptions import CommandError, PathKnownToRepositoryError
  from datalad.tests.utils_pytest import SkipTest, assert_cwd_unchanged, assert_equal, assert_false, assert_in, assert_is_instance, assert_not_in, assert_raises, eq_, neq_, ok_, swallow_logs, with_tempfile, with_tree
  from datalad.utils import Path, chpwd
label_desc: Use image node_id 11 for calling a global function with example usage: _create_test_gitrepo(temp_dir) and returns: repo,  hash_keys