def _have_context() -> bool:
        """Determine whether we can access the context vars needed for cost tracking."""

        try:
            Endpoint._context_endpoints.get()

        except LookupError:
            logger.warning(_NO_CONTEXT_WARNING)
            return False

        return True
Determine whether we can access the context vars needed for cost tracking.
src/core/trulens/core/feedback/endpoint.py