code: def test_init_as_abstract(field):
      # Before the introduction of AbstractVar, it was possible to sort-of get the same
      # behaviour by marking it as an `init=False` field. Here we check that we don't
      # break that, in particular when it's overridden by a non-field.
  
      class Abstract(eqx.Module):
          foo: int = field(init=False)
  
      class Concrete(Abstract):
          @property
          def foo(self):
              return 1
  
      x = Concrete()
      leaves, treedef = jtu.tree_flatten(x)
      assert len(leaves) == 0
      y = jtu.tree_unflatten(treedef, leaves)
      assert y.foo == 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 40 for calling a global function with example usage: test_init_as_abstract(field) and returns: int