code: def test_axis(self):
      data = [[0, 2, 1], [4, 2, 2]]
      expected0 = [[1.0, 1.5, 1.0], [2.0, 1.5, 2.0]]
      r0 = rankdata(data, axis=0)
      assert_array_equal(r0, expected0)
      expected1 = [[1.0, 3.0, 2.0], [3.0, 1.5, 1.5]]
      r1 = rankdata(data, axis=1)
      assert_array_equal(r1, expected1)
  
imports: import numpy
  from numpy.testing import assert_equal, assert_array_equal
  import pytest
  from scipy.stats import rankdata, tiecorrect
  from scipy._lib._util import np_long
label_desc: Use image node_id 8 for calling the TestRankData obj's underlying member method code with example usage: obj.test_axis() without return types