code: def rename_equation(equation, *operands):
      """
      Renames symbols in an einsum/ubersum equation to match the
      ``.pyro_dims`` attributes of packed ``operands``.
      """
      inputs, outputs = equation.split("->")
      inputs = inputs.split(",")
      assert len(inputs) == len(operands)
      rename = {
          old: new
          for input_, operand in zip(inputs, operands)
          for old, new in zip(input_, operand._pyro_dims)
      }
      return "".join(rename.get(s, s) for s in equation)
  
file_path: pyro/pyro/ops/packed.py
imports: import math
  import torch
  from pyro.distributions.util import is_identically_one
  from pyro.util import ignore_jit_warnings
label_desc: Use image node_id 9 for calling a global function with example usage: rename_equation(equation) and returns: str