code: def _transform_coordinates(
      self, points, coord2world, world2coord, inverse=False
  ):
      is_streamline_obj = isinstance(points, Streamlines)
      data = points.get_data() if is_streamline_obj else points
  
      if inverse:
          out = self._warp_coordinates_backward(
              data, coord2world, world2coord
          )
      else:
          out = self._warp_coordinates_forward(
              data, coord2world, world2coord
          )
  
      if is_streamline_obj:
          old_data_dtype = points._data.dtype
          old_offsets_dtype = points._offsets.dtype
          streamlines = points.copy()
          streamlines._offsets = points._offsets.astype(
              old_offsets_dtype
          )
          streamlines._data = out.astype(old_data_dtype)
          return streamlines
  
      return out
  
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 15 for calling the DiffeomorphicMap obj's underlying member method code with example usage: obj._transform_coordinates(points, coord2world, world2coord, inverse) and returns: out, streamlines