code: def test_boolean_index_twodim():
      # adapted from numpy's test_indexing.py
      # Indexing a 2-dimensional array with
      # 2-dimensional boolean array
      a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=np.int32)
      b = np.array(
          [
              [True, False, True],
              [False, True, False],
              [True, False, True],
          ],
          dtype=np.bool_,
      )
      assert same(
          a[b].asnumpy(), _np.array([1, 3, 5, 7, 9], dtype=a.dtype)
      )
      assert same(
          a[b[1]].asnumpy(), _np.array([[4, 5, 6]], dtype=a.dtype)
      )
      assert same(a[b[0]].asnumpy(), a[b[2]].asnumpy())
  
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 19 for calling a global function with example usage: test_boolean_index_twodim() without return types