code: def test_as_dcm_from_generic_input():
      quats = [[0, 0, 1, 1], [0, 1, 0, 1], [1, 2, 3, 4]]
      mat = Rotation.from_quat(quats).as_dcm()
      assert_equal(mat.shape, (3, 3, 3))
  
      expected0 = np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]])
      assert_array_almost_equal(mat[0], expected0)
  
      expected1 = np.array([[0, 0, 1], [0, 1, 0], [-1, 0, 0]])
      assert_array_almost_equal(mat[1], expected1)
  
      expected2 = (
          np.array([[0.4, -2, 2.2], [2.8, 1, 0.4], [-1, 2, 2]]) / 3
      )
      assert_array_almost_equal(mat[2], expected2)
  
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 11 for calling a global function with example usage: test_as_dcm_from_generic_input() without return types