code: def _calculate_rmsd(P, Q):
      """Calculates the root-mean-square distance between the points of P and Q.
      The distance is taken as the minimum over all possible matchings. It is
      zero if P and Q are identical and non-zero if not.
      """
      distance_matrix = cdist(P, Q, metric="sqeuclidean")
      matching = linear_sum_assignment(distance_matrix)
      return np.sqrt(distance_matrix[matching].sum())
  
imports: import pytest
  import numpy
  from numpy.testing import assert_array_almost_equal
  from scipy.spatial.transform import Rotation
  from scipy.optimize import linear_sum_assignment
  from scipy.spatial.distance import cdist
  from scipy.constants import golden
  from scipy.spatial import cKDTree
label_desc: Use image node_id 1 for calling a global function with example usage: _calculate_rmsd(P, Q) and returns: np