code: def test_fillpos():
      # Takes np array
      xyz = np.zeros((3,))
      w, x, y, z = nq.fillpositive(xyz)
      assert w == 1
      # Or lists
      xyz = [0] * 3
      w, x, y, z = nq.fillpositive(xyz)
      assert w == 1
      # Errors with wrong number of values
      with pytest.raises(ValueError):
          nq.fillpositive([0, 0])
      with pytest.raises(ValueError):
          nq.fillpositive([0] * 4)
      # Errors with negative w2
      with pytest.raises(ValueError):
          nq.fillpositive([1.0] * 3)
      # Test corner case where w is near zero
      wxyz = nq.fillpositive([1, 0, 0])
      assert wxyz[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 3 for calling a global function with example usage: test_fillpos() without return types