code: def fori_loop(lower, upper, body_fun, init_val):
      """For loop implementation.
  
      Args:
          lower: The initial value of the loop variable.
          upper: The upper bound of the loop variable.
          body_fun: A callable that represents the loop body. Must take two
              arguments: the loop variable and the loop state. The loop state
              should be updated and returned by this function.
          init_val: The initial value of the loop state.
  
      Returns:
          The final state after the loop.
  
      Example:
  
      >>> lower = 0
      >>> upper = 10
      >>> body_fun = lambda i, s: (i + 1, s + i)
      >>> init_val = 0
      >>> keras.ops.fori_loop(lower, upper, body_fun, init_val)
      45
      """
      if any_symbolic_tensors((lower, upper, init_val)):
          return ForiLoop(lower, upper, body_fun).symbolic_call(
              init_val
          )
      return backend.core.fori_loop(lower, upper, body_fun, init_val)
  
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 7 for calling a global function with example usage: fori_loop(lower, upper, body_fun, init_val) and returns: backend, ForiLoop