code: def test_fillpositive_plus_minus_epsilon(dtype):
      # Deterministic test for fillpositive threshold
      # We are trying to fill (x, y, z) with a w such that |(w, x, y, z)| == 1
      # If |(x, y, z)| is slightly off one, w should still be 0
      nptype = np.dtype(dtype).type
  
      # Obviously, |(x, y, z)| == 1
      baseline = np.array([0, 0, 1], dtype=dtype)
  
      # Obviously, |(x, y, z)| ~ 1
      plus = baseline * nptype(1 + np.finfo(dtype).eps)
      minus = baseline * nptype(1 - np.finfo(dtype).eps)
  
      assert nq.fillpositive(plus)[0] == 0.0
      assert nq.fillpositive(minus)[0] == 0.0
  
      # |(x, y, z)| > 1, no real solutions
      plus = baseline * nptype(1 + 2 * np.finfo(dtype).eps)
      with pytest.raises(ValueError):
          nq.fillpositive(plus)
  
      # |(x, y, z)| < 1, two real solutions, we choose positive
      minus = baseline * nptype(1 - 2 * np.finfo(dtype).eps)
      assert nq.fillpositive(minus)[0] > 0.0
  
imports: import numpy
  import pytest
  from numpy import pi
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..None import eulerangles
  from ..None import quaternions
label_desc: Use image node_id 4 for calling a global function with example usage: test_fillpositive_plus_minus_epsilon(dtype) without return types