def __init__(self, cm: contextlib.AbstractContextManager[Query]) -> None:
        self._cm = cm
        self._entered = False
    def __del__(self) -> None:
        if self._entered:
            self._cm.__exit__(None, None, None)
    def __iter__(self) -> collections.abc.Iterator:
        return self
    def __next__(self) -> Any:
        return XCom.deserialize_value(next(self._it))
    @cached_property
    def _it(self) -> collections.abc.Iterator:
        self._entered = True
        return iter(self._cm.__enter__())
@attr.define(slots=True)
class LazyXComAccess(collections.abc.Sequence):
    """Wrapper to lazily pull XCom with a sequence-like interface.
    Note that since the session bound to the parent query may have died when we
    actually access the sequence's content, we must create a new session
    for every function call with ``with_session()``.
    :meta private:
    """
    _query: Query
    _len: int | None = attr.ib(init=False, default=None)
    @classmethod
    def build_from_xcom_query(cls, query: Query) -> LazyXComAccess: