code: def _logmatmulexp(x, y):
      """
      Numerically stable version of ``(x.exp() @ y.exp()).log()``.
      """
      finfo = torch.finfo(x.dtype)  # avoid nan due to -inf - -inf
      x_shift = (
          x.detach().max(-1, keepdim=True).values.clamp_(min=finfo.min)
      )
      y_shift = (
          y.detach().max(-2, keepdim=True).values.clamp_(min=finfo.min)
      )
      xy = safe_log(
          torch.matmul((x - x_shift).exp(), (y - y_shift).exp())
      )
      return xy + x_shift + y_shift
  
imports: import torch
  import torch.nn.functional
  from pyro.ops.gamma_gaussian import GammaGaussian, gamma_and_mvn_to_gamma_gaussian, gamma_gaussian_tensordot, matrix_and_mvn_to_gamma_gaussian
  from pyro.ops.gaussian import Gaussian, gaussian_tensordot, matrix_and_mvn_to_gaussian, mvn_to_gaussian, sequential_gaussian_filter_sample, sequential_gaussian_tensordot
  from pyro.ops.indexing import Vindex
  from pyro.ops.special import safe_log
  from pyro.ops.tensor_utils import cholesky_solve, safe_cholesky
  from .None import constraints
  from .torch import Categorical, Gamma, Independent, MultivariateNormal
  from .torch_distribution import TorchDistribution
  from .util import broadcast_shape, torch_jit_script_if_tracing
label_desc: Use image node_id 2 for calling a global function with example usage: _logmatmulexp(x, y) and returns: unknown