code: def _log_soosum_exp_impl(logx, axis, keepdims, compute_mean):
      """Implementation for `*soosum*` functions."""
      with tf.name_scope("log_soosum_exp_impl"):
          logx = tf.convert_to_tensor(logx, name="logx")
          log_loosum_x, log_sum_x, n = _log_loosum_exp_impl(
              logx, axis, keepdims, compute_mean=False
          )
          # The swap-one-out-sum ('soosum') is n different sums, each of which
          # replaces the i-th item with the i-th-left-out average (or the user
          # specified value), i.e.,
          # soo_sum_x[i] = [exp(logx) - exp(logx[i])] + exp(mean(logx[!=i]))
          #              =  exp(log_loosum_x[i])      + exp(loo_log_swap_in[i])
          n = tf.cast(n, logx.dtype)
          loo_log_swap_in = (
              tf.reduce_sum(logx, axis=axis, keepdims=True) - logx
          ) / (n - 1.0)
          log_soosum_x = log_add_exp(log_loosum_x, loo_log_swap_in)
          if not compute_mean:
              return log_soosum_x, log_sum_x
          log_n = ps.log(n)
          return log_soosum_x - log_n, log_sum_x - log_n
  
file_path: probability/tensorflow_probability/python/stats/leave_one_out.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math.generic import log_add_exp
  from tensorflow_probability.python.math.generic import softplus_inverse
label_desc: Use image node_id 5 for calling a global function with example usage: _log_soosum_exp_impl(logx, axis, keepdims, compute_mean) and returns: unknown,  unknown, log_soosum_x,  log_sum_x