code: def test_fetch_user_repo_on_non_repo(caplog):
      """Test if `fetch_user_repo` logs a warning when user's script is not a git repo."""
      with caplog.at_level(logging.WARNING):
          resolve_config.fetch_user_repo(".")
      messages = [rec.message for rec in caplog.records]
      assert len(messages) == 1
      assert (
          f"Script {os.getcwd()} is not in a git repository"
          in messages[0]
      )
  
imports: import hashlib
  import logging
  import os
  import shutil
  import git
  import pytest
  import orion.core
  import orion.core.io.resolve_config
label_desc: Use image node_id 41 for calling a global function with example usage: test_fetch_user_repo_on_non_repo(caplog) without return types