code: def test_check_init_order():
      called_a = False
      called_b = False
      called_c = False
  
      class A(eqx.Module):
          def __check_init__(self):
              nonlocal called_a
              called_a = True
  
      class B(A):
          def __check_init__(self):
              nonlocal called_b
              called_b = True
              raise ValueError
  
      class C(B):
          def __check_init__(self):  # pyright: ignore
              nonlocal called_c
              called_c = True
  
      with pytest.raises(ValueError):
          C()
  
      assert called_c
      assert called_b
      assert not called_a
  
imports: import abc
  import dataclasses
  import functools
  import inspect
  from collections.abc import Callable
  from dataclasses import InitVar
  from typing import Any, Optional
  import equinox
  import equinox.internal
  import jax
  import jax.numpy
  import jax.tree_util
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 25 for calling a global function with example usage: test_check_init_order() without return types