code: def test_tree_flatten_one_level():
      x = {"a": 3, "b": (1, 2)}
      leaves, treedef = eqx.tree_flatten_one_level(x)
      assert leaves == ([3, (1, 2)])
      assert treedef == jtu.tree_structure({"a": 0, "b": 0})
  
      y = 4
      leaves, treedef = eqx.tree_flatten_one_level(y)
      assert leaves == [4]
      assert treedef == jtu.tree_structure(0)
  
      x = []
      y = []
      x.append(y)
      y.append(x)
      leaves, treedef = eqx.tree_flatten_one_level(x)
      assert leaves == [y]
      assert treedef == jtu.tree_structure([0])
  
      x = []
      x.append(x)
      with pytest.raises(ValueError):
          eqx.tree_flatten_one_level(x)
  
imports: import equinox
  import jax
  import jax.core
  import jax.nn
  import jax.numpy
  import jax.random
  import jax.tree_util
  import numpy
  import pytest
label_desc: Use image node_id 13 for calling a global function with example usage: test_tree_flatten_one_level() without return types