code: def test_generic_quat_matrix():
      x = np.array([[3, 4, 0, 0], [5, 12, 0, 0]])
      r = Rotation.from_quat(x)
      expected_quat = x / np.array([[5], [13]])
      assert_array_almost_equal(r.as_quat(), expected_quat)
  
imports: from __future__ import division, print_function, absolute_import
  import pytest
  import numpy
  from numpy.testing import assert_equal, assert_array_almost_equal
  from numpy.testing import assert_allclose
  from scipy.spatial.transform import Rotation, Slerp
  from scipy.stats import special_ortho_group
  from itertools import permutations
label_desc: Use image node_id 1 for calling a global function with example usage: test_generic_quat_matrix() without return types