code: def test_smart_array_index_empty():
      d1 = np.zeros(0)
      d2 = np.zeros((0, 2))
      _check_smart_index(d1, np.array([], dtype=int))
      _check_smart_index(d2, np.array([], dtype=int))
  
      with pytest.raises(IndexError, match="index 0 is out of bounds"):
          smart_array_index(d1, np.array([0], dtype=int))
  
      with pytest.raises(IndexError, match="index -1 is out of bounds"):
          smart_array_index(d1, np.array([-1], dtype=int))
  
      with pytest.raises(IndexError, match="index -1 is out of bounds"):
          smart_array_index(d2, np.array([-1], dtype=int))
  
      with pytest.raises(IndexError, match="index -1 is out of bounds"):
          smart_array_index(d2, np.array([-1], dtype=int))
  
file_path: stellargraph/tests/core/test_utils.py
imports: import pytest
  import numpy
  from stellargraph.core.utils import *
  from ..test_utils import flaky_xfail_mark
  from ..test_utils.graphs import example_graph_random
label_desc: Use image node_id 3 for calling a global function with example usage: test_smart_array_index_empty() without return types