code: def gen_vec(dtype):
      # Generate random 3-vector in [-1, 1]^3
      rand = np.random.default_rng()
      return rand.uniform(low=-1.0, high=1.0, size=(3,)).astype(dtype)
  
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 2 for calling a global function with example usage: gen_vec(dtype) and returns: rand