code: def test_median_nan(self, xp, dtype):
      a = xp.array(
          [[xp.nan, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, xp.nan]],
          dtype=dtype,
      )
      return xp.median(a, axis=1)
  
imports: import math
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 8 for calling the TestMedian obj's underlying member method code with example usage: obj.test_median_nan(xp, dtype) and returns: xp