code: def test_match_vectors_noise():
      np.random.seed(0)
      n_vectors = 100
      rot = Rotation.from_euler("xyz", np.random.normal(size=3))
      vectors = np.random.normal(size=(n_vectors, 3))
      result = rot.apply(vectors)
  
      # The paper adds noise as indepedently distributed angular errors
      sigma = np.deg2rad(1)
      tolerance = 1.5 * sigma
      noise = Rotation.from_rotvec(
          np.random.normal(size=(n_vectors, 3), scale=sigma)
      )
  
      # Attitude errors must preserve norm. Hence apply individual random
      # rotations to each vector.
      noisy_result = noise.apply(result)
  
      est, cov = Rotation.match_vectors(noisy_result, vectors)
  
      # Use rotation compositions to find out closeness
      error_vector = (rot * est.inv()).as_rotvec()
      assert_allclose(error_vector[0], 0, atol=tolerance)
      assert_allclose(error_vector[1], 0, atol=tolerance)
      assert_allclose(error_vector[2], 0, atol=tolerance)
  
      # Check error bounds using covariance matrix
      cov *= sigma
      assert_allclose(cov[0, 0], 0, atol=tolerance)
      assert_allclose(cov[1, 1], 0, atol=tolerance)
      assert_allclose(cov[2, 2], 0, atol=tolerance)
  
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 50 for calling a global function with example usage: test_match_vectors_noise() without return types