code: def _indices_for_numpy(indices):
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", FutureWarning)
          if len(np.empty(2)[[False, True]]) == 1:
              # new numpy
              return indices
  
      # old numpy
      if (
          isinstance(indices, list)
          and len(indices) > 0
          and isinstance(indices[0], bool)
      ):
          return np.array(indices)
      else:
          return indices
  
file_path: chainer/tests/chainer_tests/dataset_tests/tabular_tests/test_slice.py
imports: import unittest
  import warnings
  import numpy
  import six
  import chainer
  from chainer import testing
  from chainer_tests.dataset_tests.tabular_tests import dummy_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: _indices_for_numpy(indices) and returns: np, indices, indices