code: def test_boolean_index_tuple():
      # case arr[:, mask, :] and arr[1, mask, 0]
      # when a boolean array is in a tuple
      a = np.array([[[0, 1], [2, 3]], [[4, 5], [6, 7]]], dtype=np.int32)
      b = np.array([[False, True], [True, False]], dtype=np.bool)
      _np_a = a.asnumpy()
      _np_b = b.asnumpy()
      assert same(a[:, b].asnumpy(), _np_a[:, _np_b])
      assert same(a[b, :].asnumpy(), _np_a[_np_b, :])
      assert same(a[0, b].asnumpy(), _np_a[0, _np_b])
      assert same(a[b, 1].asnumpy(), _np_a[_np_b, 1])
  
      a = np.arange(12).reshape(4, 3)
      b = np.array([1.0, 2.0, 3.0])
      _np_a = a.asnumpy()
      _np_b = b.asnumpy()
      assert same(a[:, b > 2].shape, _np_a[:, _np_b > 2].shape)
      assert same(a[:, b > 2].asnumpy(), _np_a[:, _np_b > 2])
  
      a = np.array([[1, 2, 3], [3, 4, 5]])
      _np_a = a.asnumpy()
      assert same(
          a[:, a[1, :] > 0].shape, _np_a[:, _np_a[1, :] > 0].shape
      )
      assert same(
          a[:, a[1, :] > 0].asnumpy(), _np_a[:, _np_a[1, :] > 0]
      )
  
      a = np.ones((3, 2), dtype="bool")
      b = np.array([1, 2, 3])
      _np_a = a.asnumpy()
      _np_b = b.asnumpy()
      assert same(a[b > 1].asnumpy(), _np_a[_np_b > 1])
  
imports: from __future__ import absolute_import
  from __future__ import division
  import itertools
  import os
  import pytest
  import operator
  import numpy
  import mxnet
  from mxnet import np, npx, autograd
  from mxnet.gluon import HybridBlock
  from mxnet.test_utils import same, assert_almost_equal, rand_shape_nd, rand_ndarray, use_np
  from common import retry, TemporaryDirectory, xfail_when_nonstandard_decimal_separator
  from mxnet.test_utils import verify_generator, gen_buckets_probs_with_ppf, assert_exception, is_op_runnable, collapse_sum_like
  from mxnet.ndarray.ndarray import py_slice
  from mxnet.base import integer_types
label_desc: Use image node_id 21 for calling a global function with example usage: test_boolean_index_tuple() without return types