code: def test_strict_method_reoverride():
      class AbstractA(eqx.Module, strict=True):
          @abc.abstractmethod
          def foo(self, x):
              pass
  
      class AbstractB(AbstractA, strict=True):
          def foo(self, x):
              pass
  
          @abc.abstractmethod
          def bar(self, x):
              pass
  
      with pytest.raises(
          TypeError,
          match="Strict `eqx.Module`s cannot override concrete",
      ):
  
          class C(AbstractB, strict=True):
              def foo(self, x):
                  pass
  
              def bar(self, x):
                  pass
  
      class AbstractD(
          eqx.Module, strict=eqx.StrictConfig(force_abstract=True)
      ):
          foo = 4
  
      class AbstractD2(
          AbstractD, strict=eqx.StrictConfig(force_abstract=True)
      ):
          pass
  
      with pytest.raises(
          TypeError,
          match="Strict `eqx.Module`s cannot override non-methods",
      ):
  
          class E(AbstractD, strict=True):
              def foo(self):
                  pass
  
      with pytest.raises(
          TypeError,
          match="Strict `eqx.Module`s cannot override non-methods",
      ):
  
          class E2(AbstractD2, strict=True):
              def foo(self):
                  pass
  
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 34 for calling a global function with example usage: test_strict_method_reoverride() without return types