code: def test_converter_monkeypatched_init():
      class Foo(eqx.Module):
          field: jax.Array = eqx.field(converter=jnp.asarray)
  
      assert tree_allclose(
          Foo(1.0).field, jnp.array(1.0)
      )  # pyright: ignore
  
      called = False
      init = Foo.__init__
  
      def __init__(self, *args, **kwargs):
          nonlocal called
          assert not called
          called = True
          init(self, *args, **kwargs)
  
      Foo.__init__ = __init__
      assert tree_allclose(
          Foo(1.0).field, jnp.array(1.0)
      )  # pyright: ignore
      assert called
  
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 11 for calling a global function with example usage: test_converter_monkeypatched_init() without return types