code: def test_raises_exception_on_invalid_registry_value():
      with pytest.raises((ImportError, InstantiationException)):
          registry = Factory(base_type=DummyObservationConversion)
          registry.instantiate(config={"_target_": "wrong_key"})
  
file_path: maze/maze/test/core/test_registry.py
imports: import pytest
  from hydra.errors import InstantiationException
  from maze.core.utils.factory import Factory
  from maze.test.shared_test_utils.dummy_env.space_interfaces.action_conversion.dict import DictActionConversion
  from maze.test.shared_test_utils.dummy_env.space_interfaces.observation_conversion.dict import ObservationConversion
label_desc: Use image node_id 3 for calling a global function with example usage: test_raises_exception_on_invalid_registry_value() without return types