code: def guide_recurse(data, latent):
      latent.post_loc.param_(torch.tensor(0.0))
      latent.post_scale.param_(
          torch.tensor(1.0), constraint=constraints.positive
      )
      latent.z.sample_(dist.Normal(latent.post_loc, latent.post_scale))
      if torch.is_tensor(data):
          pass
      elif isinstance(data, list):
          latent.list = named.List()
          for datum in data:
              guide_recurse(datum, latent.list.add())
      elif isinstance(data, dict):
          latent.dict = named.Dict()
          for key, value in data.items():
              guide_recurse(value, latent.dict[key])
      else:
          raise TypeError("Unsupported type {}".format(type(data)))
  
file_path: pyro/examples/contrib/autoname/tree_data.py
imports: import argparse
  import torch
  from torch.distributions import constraints
  import pyro
  import pyro.distributions
  from pyro.contrib.autoname import named
  from pyro.infer import SVI, Trace_ELBO
  from pyro.optim import Adam
label_desc: Use image node_id 4 for calling a global function with example usage: guide_recurse(data, latent) without return types