code: def init_loc_fn(site):
      value = init_to_median(site, num_samples=50)
      # we also make sure the initial sigma is not too large.
      # (otherwise we run the danger of getting stuck in bad local optima during optimization).
      if site["name"] == "sigma":
          value = 0.1 * value
      return value
  
file_path: pyro/examples/sparse_regression.py
imports: import argparse
  import math
  import numpy
  import torch
  from torch.optim import Adam
  import pyro
  import pyro.distributions
  from pyro import poutine
  from pyro.infer import Trace_ELBO
  from pyro.infer.autoguide import AutoDelta, init_to_median
label_desc: Use image node_id 6 for calling a global function with example usage: init_loc_fn(site) and returns: value