code: def test_nnabla_boolean_array_as_index():
      x_np = np.random.rand(20)
      i_np = x_np > 0.5
      x_nn = nn.Variable.from_numpy_array(x_np)
      i_nn = nn.Variable.from_numpy_array(i_np)
      with nn.auto_forward(True):
          assert_allclose(x_nn[i_nn].d, x_np[i_np])
          assert_allclose(x_nn.data[i_nn].data, x_np[i_np])
          x_np[i_np] = -1
          x_nn[i_nn] = -1
          assert_allclose(x_nn.d, x_np)
  
file_path: nnabla/python/test/test_indexing.py
imports: import pytest
  import numpy
  import nnabla
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 7 for calling a global function with example usage: test_nnabla_boolean_array_as_index() without return types