code: def test_median_invalid_axis(self):
      for xp in [numpy, cupy]:
          a = testing.shaped_random((3, 4, 5), xp)
          with pytest.raises(numpy.AxisError):
              return xp.median(a, -a.ndim - 1, keepdims=False)
  
          with pytest.raises(numpy.AxisError):
              return xp.median(a, a.ndim, keepdims=False)
  
          with pytest.raises(numpy.AxisError):
              return xp.median(a, (-a.ndim - 1, 1), keepdims=False)
  
          with pytest.raises(numpy.AxisError):
              return xp.median(
                  a,
                  (
                      0,
                      a.ndim,
                  ),
                  keepdims=False,
              )
  
imports: import math
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 7 for calling the TestMedian obj's underlying member method code with example usage: obj.test_median_invalid_axis() and returns: xp, xp, xp, xp