code: def if_else(
      cond: Callable,
      body_fn: Callable,
      orelse_fn: Callable,
      vars: Dict[str, Union[ivy.Array, ivy.NativeArray]],
  ) -> Any:
      """Take a condition function and two functions as input. If the condition
      is True, the first function is executed and its result is returned.
      Otherwise, the second function is executed and its result is returned.
  
      Parameters
      ----------
      cond
          A function returning a boolean.
      body_fn
          A callable function to be executed if the condition is True.
      orelse_fn
          A callable function to be executed if the condition is False.
      vars
          Additional variables to be passed to the functions.
  
      Returns
      -------
      ret
          The result of executing either body_fn or orelse_fn depending on the value of
          cond.
  
      Examples
      --------
      >>> cond = lambda x: True
      >>> body_fn = lambda x: x + 1
      >>> orelse_fn = lambda x: x - 1
      >>> vars = (1,)
      >>> result = ivy.if_else(cond, body_fn, orelse_fn, vars)
      >>> print(result)
      2
  
      >>> cond = lambda x: True
      >>> body_fn = lambda x: x * 2
      >>> orelse_fn = lambda x: x / 2
      >>> vars = ivy.array([1, 2, 3])
      >>> result = ivy.if_else(cond, body_fn, orelse_fn, vars=(vars,))
      >>> print(result)
      ivy.array([0.5, 1.0, 1.5])
      """
  
      @to_native_arrays_and_back
      @handle_array_like_without_promotion
      def _if_else(cond, body_fn, orelse_fn, **vars):
          return current_backend().if_else(
              cond, body_fn, orelse_fn, vars
          )
  
      return _if_else(cond, body_fn, orelse_fn, **vars)
  
file_path: ivy/ivy/functional/ivy/control_flow_ops.py
imports: from typing import Union, Callable, Any, Iterable, Dict
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_like_without_promotion, to_native_arrays_and_back
label_desc: Use image node_id 1 for calling a global function with example usage: if_else(cond, body_fn, orelse_fn, vars) and returns: _if_else, current_backend