def METHOD_NAME(self, sample: SampleTiles, idx: int):
    """Registers a new tiled sample into the encoder.
    Args:
        sample: The sample to be registered.
        idx: The global sample index.
    """
    ss: Tuple[int, ...] = sample.sample_shape  # type: ignore
    ts: Tuple[int, ...] = sample.tile_shape
    self.entries[idx] = (ss, ts)
    self.is_dirty = True