code: def test_sumexp():
      from brainiak.utils.utils import sumexp_stable
      import numpy as np
  
      data = np.array([[1, 1], [0, 1]])
      sums, maxs, exps = sumexp_stable(data)
      assert (
          sums.size == data.shape[1]
      ), "Invalid sum(exp(v)) computation (wrong # samples in sums)"
      assert (
          exps.shape[0] == data.shape[0]
      ), "Invalid exp(v) computation (wrong # features)"
      assert (
          exps.shape[1] == data.shape[1]
      ), "Invalid exp(v) computation (wrong # samples)"
      assert (
          maxs.size == data.shape[1]
      ), "Invalid max computation (wrong # samples in maxs)"
  
file_path: brainiak/tests/utils/test_utils.py
imports: import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_sumexp() without return types