code: def _get_dist_name(fn):
      while isinstance(
          fn,
          (
              dist.Independent,
              dist.ExpandedDistribution,
              dist.MaskedDistribution,
          ),
      ):
          fn = fn.base_dist
      return type(fn).__name__
  
imports: import itertools
  import os
  from collections import defaultdict
  from pathlib import Path
  from types import SimpleNamespace
  from typing import Callable, Collection, Dict, List, Optional, Union
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.ops.provenance import ProvenanceTensor, detach_provenance, get_provenance
  from pyro.poutine.messenger import Messenger
  from pyro.poutine.util import site_is_subsample
label_desc: Use image node_id 5 for calling a global function with example usage: _get_dist_name(fn) and returns: type