code: def outputs_to_frontend_arrays(fn: Callable) -> Callable:
      @functools.wraps(fn)
      def _outputs_to_frontend_arrays(*args, order="K", **kwargs):
          """Call the function, and then convert all `ivy.Array` instances
          returned by the function into `ndarray` instances.
  
          Returns
          -------
              The return of the function, with ivy arrays as numpy arrays.
          """
          # handle order and call unmodified function
          # ToDo: Remove this default dtype setting
          #  once frontend specific backend setting is added
          set_default_dtype = False
          if not (
              "dtype" in kwargs and ivy.exists(kwargs["dtype"])
          ) and any(
              not (ivy.is_array(i) or hasattr(i, "ivy_array"))
              for i in args
          ):
              if ivy.current_backend_str() == "jax":
                  import jax
  
                  jax.config.update("jax_enable_x64", True)
              (
                  ivy.set_default_int_dtype("int64")
                  if platform.system() != "Windows"
                  else ivy.set_default_int_dtype("int32")
              )
              ivy.set_default_float_dtype("float64")
              set_default_dtype = True
          if contains_order:
              if len(args) >= (order_pos + 1):
                  order = args[order_pos]
                  args = args[:-1]
              order = _set_order(args, order)
              try:
                  ret = fn(*args, order=order, **kwargs)
              finally:
                  if set_default_dtype:
                      ivy.unset_default_int_dtype()
                      ivy.unset_default_float_dtype()
          else:
              try:
                  ret = fn(*args, **kwargs)
              finally:
                  if set_default_dtype:
                      ivy.unset_default_int_dtype()
                      ivy.unset_default_float_dtype()
          if not ivy.array_mode:
              return ret
          # convert all returned arrays to `ndarray` instances
          if order == "F":
              return ivy.nested_map(
                  _ivy_to_numpy_order_F,
                  ret,
                  include_derived={"tuple": True},
              )
          else:
              return ivy.nested_map(
                  _ivy_to_numpy, ret, include_derived={"tuple": True}
              )
  
      if "order" in list(inspect.signature(fn).parameters.keys()):
          contains_order = True
          order_pos = list(inspect.signature(fn).parameters).index(
              "order"
          )
      else:
          contains_order = False
      _outputs_to_frontend_arrays.outputs_to_frontend_arrays_numpy = (
          True
      )
      return _outputs_to_frontend_arrays
  
imports: import functools
  from typing import Callable, Any
  import inspect
  import platform
  import ivy
  import ivy.functional.frontends.numpy
label_desc: Use image node_id 20 for calling a global function with example usage: outputs_to_frontend_arrays(fn) and returns: _outputs_to_frontend_arrays, ret, ivy, ivy