class_docstr: Ring of forward-sumproduct backward-marginal operations in log space.
class_docstr_tok: ["Ring","of","forward-sumproduct","backward-marginal","operations","in","log","space","."]
code: def product(self, term, ordinal):
      result = super().product(term, ordinal)
      if hasattr(term, "_pyro_backward"):
          result._pyro_backward = _MarginalProductBackward(
              self, term, ordinal, result
          )
      return result
  
imports: import weakref
  from abc import ABCMeta, abstractmethod
  import torch
  from pyro.ops.einsum import contract
  from pyro.ops.einsum.adjoint import SAMPLE_SYMBOL, Backward
  from pyro.util import ignore_jit_warnings
label_desc: Use image node_id 1 for calling the MarginalRing obj's underlying member method code with example usage: obj.product(term, ordinal) and returns: result