code: def _update_history_vectors(history, new):
      # TODO(Jakob-Unfried) use rolling buffer instead? See #6053
      return jnp.roll(history, -1, axis=0).at[-1, :].set(new)
  
file_path: jax/jax/_src/scipy/optimize/_lbfgs.py
imports: from __future__ import annotations
  from typing import Callable, NamedTuple
  from functools import partial
  import jax
  import jax.numpy
  from jax import lax
  from jax._src.scipy.optimize.line_search import line_search
  from jax._src.typing import Array
label_desc: Use image node_id 3 for calling a global function with example usage: _update_history_vectors(history, new) and returns: jnp