code: def logsumexp(arr, axis=0):
      """Computes the sum of arr assuming arr is in the log domain.
      Returns log(sum(exp(arr))) while minimizing the possibility of
      over/underflow.
      Examples
      --------
      >>> import numpy as np
      >>> from sklearn.utils.extmath import logsumexp
      >>> a = np.arange(10)
      >>> np.log(np.sum(np.exp(a)))
      9.4586297444267107
      >>> logsumexp(a)
      9.4586297444267107
      """
      if axis == 0:
          pass
      elif axis == 1:
          arr = arr.T
      else:
          raise NotImplementedError
      # Use the max to normalize, as with the log this is what accumulates
      # the less errors
      vmax = arr.max(axis=0)
      out = da.log(da.sum(da.exp(arr - vmax), axis=0))
      out += vmax
      return out
  
file_path: dask-ml/dask_ml/naive_bayes.py
imports: import dask
  import dask.array
  import numpy
  from dask import delayed
  from sklearn.base import BaseEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: logsumexp(arr, axis) and returns: out