def METHOD_NAME(self) -> Generator[None, None, None]:
    """Return a context manager keeping the position.
    At the end of the block, seek back to original position.
    """
    pos = self.tell()
    try:
        yield
    finally:
        self.seek(pos)