class_docstr: Handles updating the state for a `lift_with_state` computation.
class_docstr_tok: ["Handles","updating","the","state","for","a","`","lift_with_state","`","computation","."]
code: def assert_used(self):
      if not self._used:
          raise ValueError(
              "LiftWithStateUpdater (from `lift_with_state`) must be "
              "used, call `.update(..)` or `.ignore_update()` before "
              "it goes out of scope."
          )
  
imports: from collections.abc import Mapping, MutableMapping
  import functools
  from typing import Any, Callable, Optional, TypeVar
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import module
  from haiku._src import transform
  from haiku._src.typing import LiftingModuleType
label_desc: Use image node_id 2 for calling the LiftWithStateUpdater obj's underlying member method code with example usage: obj.assert_used() without return types