code: def test_to_prob(an_array, a_binary_array):
      out = to_prob(an_array)
      assert not np.allclose(out, an_array)
  
      out = to_prob(a_binary_array)
      assert not np.allclose(out, a_binary_array)
  
      a_array_scaled = softmax(an_array, 1)
      a_binary_array_scaled = expit(a_binary_array)
  
      out = to_prob(a_array_scaled)
      assert np.allclose(out, a_array_scaled)
  
      out = to_prob(a_binary_array_scaled)
      assert np.allclose(out, a_binary_array_scaled)
  
file_path: baal/tests/utils/test_array_utils.py
imports: import numpy
  import pytest
  import torch
  from scipy.special import softmax, expit
  from baal.utils import array_utils
  from baal.utils.array_utils import to_prob
  from baal.utils.iterutils import map_on_tensor
label_desc: Use image node_id 6 for calling a global function with example usage: test_to_prob(an_array, a_binary_array) without return types