code: def trace_name_is_observed(model):
      trace = poutine.trace(model).get_trace()
      return [
          (name, site["is_observed"])
          for name, site in trace.nodes.items()
          if site["type"] == "sample"
          and type(site["fn"]).__name__ != "_Subsample"
      ]
  
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro import poutine
  from pyro.infer import SVI, Predictive, Trace_ELBO
  from pyro.infer.autoguide import AutoNormal
  from pyro.infer.reparam import AutoReparam, MinimalReparam
  from pyro.optim import Adam
label_desc: Use image node_id 1 for calling a global function with example usage: trace_name_is_observed(model) and returns: unknown