code: def orientation_to_string(ornt):
      """Return a string representation of a 3d ornt."""
      if _check_ornt(ornt):
          msg = repr(ornt) + " does not seem to be a valid orientation"
          raise ValueError(msg)
      orientation_dict = {
          (0, 1): "r",
          (0, -1): "l",
          (1, 1): "a",
          (1, -1): "p",
          (2, 1): "s",
          (2, -1): "i",
      }
      ornt_string = ""
      for ii in ornt:
          ornt_string += orientation_dict[(ii[0], ii[1])]
      return ornt_string
  
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 23 for calling a global function with example usage: orientation_to_string(ornt) and returns: ornt_string