code: def _unary_logeinsumexp(formula, a):
      """Compute `einsum` in log space for the case of one tensor argument."""
      lhs_a, rhs = formula.split("->")
  
      lhs_a, a = _extract_diagonals(lhs_a, a)
      lhs_a, a = _internal_contract(lhs_a, a, rhs)
      a = rearrange(lhs_a, rhs, a)
  
      return a
  
file_path: probability/tensorflow_probability/python/experimental/marginalize/logeinsumexp.py
imports: import opt_einsum
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 6 for calling a global function with example usage: _unary_logeinsumexp(formula, a) and returns: a