code: def test_prune_vars_detached_from_observed():
      with pm.Model() as m:
          obs_data = pm.MutableData("obs_data", 0)
          a0 = pm.ConstantData("a0", 0)
          a1 = pm.Normal("a1", a0)
          a2 = pm.Normal("a2", a1)
          pm.Normal("obs", a2, observed=obs_data)
  
          d0 = pm.ConstantData("d0", 0)
          d1 = pm.Normal("d1", d0)
  
      assert set(m.named_vars.keys()) == {
          "obs_data",
          "a0",
          "a1",
          "a2",
          "obs",
          "d0",
          "d1",
      }
      pruned_m = prune_vars_detached_from_observed(m)
      assert set(pruned_m.named_vars.keys()) == {
          "obs_data",
          "a0",
          "a1",
          "a2",
          "obs",
      }
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_prune_vars_detached_from_observed() without return types