class_docstr: A bounded functional stack implementation. Elements may be pytrees.
docstr: Pops from the stack, returning an (elem, updated stack) pair.
docstr_tok: ["Pops","from","the","stack",",","returning","an","(","elem",",","updated","stack",")","pair","."]
code: def pop(self) -> tuple[Any, Stack]:
      """Pops from the stack, returning an (elem, updated stack) pair."""
      elem = jax.tree_util.tree_map(
          lambda x: lax.dynamic_index_in_dim(
              x, self._size - 1, 0, keepdims=False
          ),
          self._data,
      )
      return elem, Stack(self._size - 1, self._data)
  
file_path: jax/jax/_src/lax/stack.py
imports: from __future__ import annotations
  from typing import Any
  import jax
  from jax import lax
  import jax.numpy
label_desc: Use image node_id 6 for calling the Stack obj's underlying member method code with example usage: obj.pop() and returns: elem,  Stack