code: def test_not_implemented(backend):
      with pyro_backend(backend):
          pyro.sample  # should be implemented
          pyro.param  # should be implemented
          with pytest.raises(NotImplementedError):
              pyro.nonexistent_primitive
  
file_path: pyro/tests/test_generic.py
imports: import pytest
  from pyroapi.testing import MODELS
  from pyro.generic import handlers, infer, ops, pyro, pyro_backend
  from tests.common import xfail_if_not_implemented
label_desc: Use image node_id 2 for calling a global function with example usage: test_not_implemented(backend) without return types