docstr: Converting static - moving models in both direction.
  
  Parameters
  ----------
  current_disp_world2grid : array, shape (3, 3) or  (4, 4)
      the space-to-grid transformation associated to the displacement field
      d (transforming physical space coordinates to voxel coordinates of the
      displacement field grid)
  current_disp_spacing :array, shape (2,) or  (3,)
      the spacing between voxels (voxel size along each axis)
code: def __invert_models(
      self, current_disp_world2grid, current_disp_spacing
  ):
      """Converting static - moving models in both direction.
  
      Parameters
      ----------
      current_disp_world2grid : array, shape (3, 3) or  (4, 4)
          the space-to-grid transformation associated to the displacement field
          d (transforming physical space coordinates to voxel coordinates of the
          displacement field grid)
      current_disp_spacing :array, shape (2,) or  (3,)
          the spacing between voxels (voxel size along each axis)
      """
  
      # Invert the forward model's forward field
      self.static_to_ref.backward = np.array(
          self.invert_vector_field(
              self.static_to_ref.forward,
              current_disp_world2grid,
              current_disp_spacing,
              self.inv_iter,
              self.inv_tol,
              self.static_to_ref.backward,
          )
      )
  
      # Invert the backward model's forward field
      self.moving_to_ref.backward = np.array(
          self.invert_vector_field(
              self.moving_to_ref.forward,
              current_disp_world2grid,
              current_disp_spacing,
              self.inv_iter,
              self.inv_tol,
              self.moving_to_ref.backward,
          )
      )
  
      # Invert the forward model's backward field
      self.static_to_ref.forward = np.array(
          self.invert_vector_field(
              self.static_to_ref.backward,
              current_disp_world2grid,
              current_disp_spacing,
              self.inv_iter,
              self.inv_tol,
              self.static_to_ref.forward,
          )
      )
  
      # Invert the backward model's backward field
      self.moving_to_ref.forward = np.array(
          self.invert_vector_field(
              self.moving_to_ref.backward,
              current_disp_world2grid,
              current_disp_spacing,
              self.inv_iter,
              self.inv_tol,
              self.moving_to_ref.forward,
          )
      )
  
imports: import logging
  import abc
  import numpy
  import numpy.linalg
  import nibabel
  from nibabel.streamlines import ArraySequence
  from dipy.align import vector_fields
  from dipy.align import floating
  from dipy.align import VerbosityLevels
  from dipy.align import Bunch
  from dipy.align.scalespace import ScaleSpace
label_desc: Use image node_id 9 for calling the SymmetricDiffeomorphicRegistration obj's underlying member method code with example usage: obj.__invert_models(current_disp_world2grid, current_disp_spacing) without return types