code: def _apply_cached_indexes(self, cached_indexes, persist=False):
          
          # cacheable_dict = {}
          for elt in ['valid_input_index', 'valid_output_index',
                      'index_array', 'distance_array']:
              val = cached_indexes[elt]
              if isinstance(val, tuple):
                  val = cached_indexes[elt][0]
              elif isinstance(val, np.ndarray):
                  val = da.from_array(val, chunks=CHUNK_SIZE)
              elif persist and isinstance(val, da.Array):
                  cached_indexes[elt] = val = val.persist()
              setattr(self.resampler, elt, val)
docs: Reassign various resampler index attributes.