code: def test_infer_version_on_invalid_head(invalid_repo, caplog):
      """Test that repo is ignored if repo has an invalid HEAD state."""
  
      with caplog.at_level(logging.WARNING):
          assert resolve_config.infer_versioning_metadata(".git") == {}
  
      assert "dummy_orion has an invalid HEAD." in caplog.text
  
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 38 for calling a global function with example usage: test_infer_version_on_invalid_head(invalid_repo, caplog) without return types