code: def while_loop(
      cond,
      body,
      loop_vars,
      maximum_iterations=None,
  ):
      """While loop implementation.
  
      Args:
          cond: A callable that represents the termination condition of the loop.
              Must have the same number of args as `loop_vars`, and return a bool.
          body: A callable that represents the loop body. Must have the same
              number of args as `loop_vars`, and return a list/tuple of the same
              length, shape and dtype as `loop_vars`.
          loop_vars: A list/tuple of tensors, the loop variables.
          maximum_iterations: Optional maximum number of iterations of the while
              loop to run. If provided, the `cond` output is AND-ed with an
              additional condition ensuring the number of iterations executed is
              no greater than `maximum_iterations`.
  
      Returns:
          A list/tuple of tensors, has the same shape and dtype as `inputs`.
  
      Examples:
  
      >>> i = 0
      >>> cond = lambda i: i < 10
      >>> body = lambda i: i + 1
      >>> keras.ops.while_loop(cond, body, [i])[0]
      10
      """
      return backend.core.while_loop(
          cond,
          body,
          loop_vars,
          maximum_iterations=maximum_iterations,
      )
  
imports: import numpy
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend import KerasTensor
  from keras.backend import any_symbolic_tensors
  from keras.ops.operation import Operation
  from keras.utils import traceback_utils
label_desc: Use image node_id 5 for calling a global function with example usage: while_loop(cond, body, loop_vars, maximum_iterations) and returns: backend