def comp_x(self) -> Callable[[], int]:
            """Nested function.

            Returns:
                A function that returns the value of self.x.
            """

            def _():
                return self.x

            return _
Nested function.

            Returns:
                A function that returns the value of self.x.
            
tests/units/test_state.py