code: def test_as_dcm_single_1d_quaternion():
      quat = [0, 0, 0, 1]
      mat = Rotation.from_quat(quat).as_dcm()
      # mat.shape == (3,3) due to 1d input
      assert_array_almost_equal(mat, np.eye(3))
  
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 8 for calling a global function with example usage: test_as_dcm_single_1d_quaternion() without return types