code: def test_observe_warn():
      with pytest.warns(RuntimeWarning):
          pyro.sample("x", dist.Normal(0, 1), obs=torch.tensor(0.0))
  
file_path: pyro/tests/test_primitives.py
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
label_desc: Use image node_id 2 for calling a global function with example usage: test_observe_warn() without return types