code: def from_nibabel(nib_image):
      
      tmpfile = mktemp(suffix='.nii.gz')
      nib_image.to_filename(tmpfile)
      new_img = iio2.image_read(tmpfile)
      os.remove(tmpfile)
      return new_img
docs: Convert a nibabel image to an ANTsImage