code: def test_expand_dims_out_of_range(self):
      for xp in (numpy, cupy):
          a = testing.shaped_arange((2, 2, 2), xp)
          for axis in [(1, -6), (1, 5)]:
              with pytest.raises(numpy.AxisError):
                  xp.expand_dims(a, axis)
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy.cuda import runtime
  from cupy import testing
label_desc: Use image node_id 21 for calling the TestDims obj's underlying member method code with example usage: obj.test_expand_dims_out_of_range() without return types