code: def get_window_from_xy(self, xy):
          
          a_transform = self._get_template_for_given_resolution(res=self.dst_res, return_="meta")["transform"]
          row, col = transform.rowcol(a_transform, xy[0], xy[1])
          ij_containing_xy = None
          for ji, win in enumerate(self.windows):
              (row_start, row_end), (col_start, col_end) = rasterio.windows.toranges(win)
              # print(row, col, row_start, row_end, col_start, col_end)
              if ((col >= col_start) & (col < col_end)) & ((row >= row_start) & (row < row_end)):
                  ij_containing_xy = ji
                  break
          if ij_containing_xy is None:
              raise ValueError("The given 'xy' value is not contained in any window.")
          return ij_containing_xy
docs: Get the window index given a coordinate (raster CRS).