code: def test_buffer_donation_function():
      @eqx.filter_jit(donate="all")
      def f(x):
          return x + 1
  
      x = jnp.array(0.0)
      old_p = x.unsafe_buffer_pointer()
      new_x = f(x)
      assert tree_allclose(new_x, jnp.array(1.0))
      assert x.is_deleted()
      assert new_x.unsafe_buffer_pointer() == old_p
  
imports: import warnings
  from typing import Union
  import equinox
  import jax
  import jax.numpy
  import jax.random
  import jax.tree_util
  import pytest
  from .helpers import tree_allclose
label_desc: Use image node_id 10 for calling a global function with example usage: test_buffer_donation_function() and returns: unknown