code: def apply_xy_shift(ds, dx, dy, createcopy=True):
      
      print("X shift: ", dx)
      print("Y shift: ", dy)
     
      #Update geotransform
      gt_orig = ds.GetGeoTransform()
      gt_shift = np.copy(gt_orig)
      gt_shift[0] += dx 
      gt_shift[3] += dy
  
      print("Original geotransform:", gt_orig)
      print("Updated geotransform:", gt_shift)
  
      #Update ds Geotransform
      if createcopy:
          ds_align = iolib.mem_drv.CreateCopy('', ds, 0)
      else:
          #Update in place, assume ds is opened as GA_Update
          ds_align = ds
      ds_align.SetGeoTransform(gt_shift)
      return ds_align
docs: Apply horizontal shift to GDAL dataset GeoTransform
      
      Returns:
      GDAL Dataset copy with updated GeoTransform