code: def ornt_mapping(ornt1, ornt2):
      """Calculate the mapping needing to get from orn1 to orn2."""
  
      mapping = np.empty((len(ornt1), 2), "int")
      mapping[:, 0] = -1
      A = ornt1[:, 0].argsort()
      B = ornt2[:, 0].argsort()
      mapping[B, 0] = A
      assert (mapping[:, 0] != -1).all()
      sign = ornt2[:, 1] * ornt1[mapping[:, 0], 1]
      mapping[:, 1] = sign
      return mapping
  
imports: import logging
  from warnings import warn
  import numpy
  from scipy.linalg import inv, polar
  from dipy.io import gradients
  from dipy.core.onetime import auto_attr
  from dipy.core.geometry import vector_norm, vec2vec_rotmat
  from dipy.core.sphere import disperse_charges, HemiSphere
  from dipy.utils.deprecator import deprecate_with_version
label_desc: Use image node_id 19 for calling a global function with example usage: ornt_mapping(ornt1, ornt2) and returns: mapping