code: def aic_num_parameters(model, guide=None):
      """
      hacky AIC param count that includes all parameters in the model and guide
      """
      with poutine.block(), poutine.trace(
          param_only=True
      ) as param_capture:
          model()
          if guide is not None:
              guide()
  
      return sum(
          node["value"].numel()
          for node in param_capture.trace.nodes.values()
      )
  
file_path: funsor/examples/mixed_hmm/experiment.py
imports: import argparse
  import functools
  import json
  import os
  import uuid
  import pyro
  import pyro.poutine
  import torch
  from model import Guide, Model
  from seal_data import prepare_fake, prepare_seal
  import funsor
  import funsor.ops
  from funsor.optimizer import apply_optimizer
  from funsor.sum_product import MarkovProduct, naive_sequential_sum_product, sum_product
  from funsor.terms import to_funsor
label_desc: Use image node_id 1 for calling a global function with example usage: aic_num_parameters(model, guide) and returns: sum