code: def test_from_dcm_calculation():
      expected_quat = np.array([1, 1, 6, 1]) / np.sqrt(39)
      dcm = np.array(
          [
              [-0.8974359, -0.2564103, 0.3589744],
              [0.3589744, -0.8974359, 0.2564103],
              [0.2564103, 0.3589744, 0.8974359],
          ]
      )
      assert_array_almost_equal(
          Rotation.from_dcm(dcm).as_quat(), expected_quat
      )
      assert_array_almost_equal(
          Rotation.from_dcm(dcm.reshape((1, 3, 3))).as_quat(),
          expected_quat.reshape((1, 4)),
      )
  
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 14 for calling a global function with example usage: test_from_dcm_calculation() without return types