code: def log_normalize(v, axis=0):
      """Normalized probabilities from unnormalized log-probabilites"""
      v = np.rollaxis(v, axis)
      v = v.copy()
      v -= v.max(axis=0)
      out = logsumexp(v)
      v = np.exp(v - out)
      v += np.finfo(np.float32).eps
      v /= np.sum(v, axis=0)
      return np.swapaxes(v, 0, axis)
  
imports: from __future__ import print_function
  import numpy
  from scipy.special import digamma, gammaln
  from scipy import linalg
  from scipy.spatial.distance import cdist
  from ..externals.six.moves import xrange
  from ..utils import check_random_state, check_array, deprecated
  from ..utils.extmath import logsumexp, pinvh, squared_norm
  from ..utils.validation import check_is_fitted
  from ..None import cluster
  from .gmm import _GMMBase
label_desc: Use image node_id 3 for calling a global function with example usage: log_normalize(v, axis) and returns: np