class_docstr: Tests for various tree utilities.
class_docstr_tok: ["Tests","for","various","tree","utilities","."]
docstr: Tests that `unstack_sequence_fields(stack_sequence_fields(x)) == x`.
docstr_tok: ["Tests","that","`","unstack_sequence_fields","(","stack_sequence_fields","(","x",")",")","==","x","`","."]
code: def test_unstack_sequence_fields(self):
      """Tests that `unstack_sequence_fields(stack_sequence_fields(x)) == x`."""
      stacked = tree_utils.stack_sequence_fields(TEST_SEQUENCE)
      batch_size = len(TEST_SEQUENCE)
      unstacked = tree_utils.unstack_sequence_fields(
          stacked, batch_size
      )
      tree.map_structure(
          np.testing.assert_array_equal, unstacked, TEST_SEQUENCE
      )
  
file_path: acme/acme/utils/tree_utils_test.py
imports: import functools
  from typing import Sequence
  from acme.utils import tree_utils
  import numpy
  import tree
  from absl.testing import absltest
label_desc: Use image node_id 2 for calling the SequenceStackTest obj's underlying member method code with example usage: obj.test_unstack_sequence_fields() without return types