code: def test_nanmedian(self, xp, dtype):
      a = xp.array(self._make_array(dtype))
      out = xp.nanmedian(
          a,
          self.axis,
          keepdims=self.keepdims,
          overwrite_input=self.overwrite_input,
      )
      return xp.ascontiguousarray(out)
  
imports: import math
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 2 for calling the TestNanMedian obj's underlying member method code with example usage: obj.test_nanmedian(xp, dtype) and returns: xp