code: def preconditioner(radius):
      """
      Computes a scaling vector pc such that, if p=(u,r,s,q) represents
      affine transformation parameters, where u is a translation, r and
      q are rotation vectors, and s is the vector of log-scales, then
      all components of (p/pc) are roughly comparable to the translation
      component.
  
      To that end, we use a `radius` parameter which represents the
      'typical size' of the object being registered. This is used to
      reformat the parameter vector
      (translation+rotation+scaling+pre-rotation) so that each element
      roughly represents a variation in mm.
      """
      rad = 1.0 / radius
      sca = 1.0 / radius
      return np.array(
          [1, 1, 1, rad, rad, rad, sca, sca, sca, rad, rad, rad]
      )
  
imports: import numpy
  import scipy.linalg
  from nibabel.affines import apply_affine
  from transforms3d.quaternions import mat2quat, quat2axangle
  from .transform import Transform
label_desc: Use image node_id 5 for calling a global function with example usage: preconditioner(radius) and returns: np