code: def test_converter_init_hierarchy(base_is_module):
      class A(
          eqx.Module if base_is_module else object
      ):  # pyright: ignore
          def __init__(self, x):
              nonlocal called
              assert not called
              called = True
              self.x = x
  
      class B(eqx.Module):
          x: jax.Array = eqx.field(converter=jnp.asarray)
  
      class C(A, B):
          # Use `A.__init__`
          pass
  
      class D(B, A):
          # Use the autogenerated `B.__init__`
          pass
  
      # In either case, conversion should happen.
  
      called = False
      assert tree_allclose(C(1).x, jnp.array(1))
      assert called
  
      assert tree_allclose(D(1).x, jnp.array(1))
  
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 13 for calling a global function with example usage: test_converter_init_hierarchy(base_is_module) without return types