code: def test_deterministic_order(self):
      class A(nnx.Pytree):
          def __init__(self, order: bool):
              if order:
                  self.a = 1
                  self.b = 2
              else:
                  self.b = 2
                  self.a = 1
  
      p1 = A(order=True)
      p2 = A(order=False)
  
      leaves1 = jax.tree_util.tree_leaves(p1)
      leaves2 = jax.tree_util.tree_leaves(p2)
  
      assert leaves1 == leaves2
  
file_path: flax/flax/experimental/nnx/tests/test_pytree.py
imports: from typing import Generic, TypeVar
  import jax
  import pytest
  from flax import serialization
  from flax.experimental import nnx
label_desc: Use image node_id 10 for calling the TestPytree obj's underlying member method code with example usage: obj.test_deterministic_order() without return types