code: def conditional_update(
      new_tensors: Any, old_tensors: Any, is_time: Numeric
  ):
      """Checks whether to update the params and returns the correct params."""
      warnings.warn(
          "Rlax conditional_update will be deprecated. Please use optax instead.",
          PendingDeprecationWarning,
          stacklevel=2,
      )
      return jax.tree_map(
          lambda new, old: jax.lax.select(is_time, new, old),
          new_tensors,
          old_tensors,
      )
  
imports: from typing import Any
  import warnings
  import chex
  import jax
label_desc: Use image node_id 1 for calling a global function with example usage: conditional_update(new_tensors, old_tensors, is_time) and returns: jax