code: def from_zero_dim_arrays_to_scalar(fn: Callable) -> Callable:
      @functools.wraps(fn)
      def _from_zero_dim_arrays_to_scalar(*args, **kwargs):
          """Call the function, and then convert all 0 dimensional array
          instances in the function to float numbers if out argument is not
          provided.
  
          Parameters
          ----------
          args
              The arguments to be passed to the function.
  
          kwargs
              The keyword arguments to be passed to the function.
  
          Returns
          -------
              The return of the function, with 0 dimensional arrays as float numbers.
          """
          # call unmodified function
          ret = fn(*args, **kwargs)
  
          if (
              "out" in kwargs and kwargs["out"] is None
          ) or "out" not in kwargs:
              if isinstance(ret, tuple):
                  # converting every scalar element of the tuple to float
                  data = tuple(ivy.native_array(i) for i in ret)
                  data = ivy.copy_nest(data, to_mutable=True)
                  ret_idx = ivy.nested_argwhere(
                      data, lambda x: x.shape == ()
                  )
                  try:
                      ivy.map_nest_at_indices(
                          data,
                          ret_idx,
                          lambda x: np_frontend.numpy_dtype_to_scalar[
                              ivy.dtype(x)
                          ](x),
                      )
                  except KeyError as e:
                      raise ivy.utils.exceptions.IvyException(
                          "Casting to specified type is unsupported"
                      ) from e
                  return tuple(data)
              else:
                  # converting the scalar to float
                  data = ivy.native_array(ret)
                  if data.shape == ():
                      try:
                          return np_frontend.numpy_dtype_to_scalar[
                              ivy.dtype(data)
                          ](data)
                      except KeyError as e:
                          raise ivy.utils.exceptions.IvyException(
                              f"Casting to {ivy.dtype(data)} is unsupported"
                          ) from e
          return ret
  
      _from_zero_dim_arrays_to_scalar.from_zero_dim_arrays_to_scalar = (
          True
      )
      return _from_zero_dim_arrays_to_scalar
  
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 14 for calling a global function with example usage: from_zero_dim_arrays_to_scalar(fn) and returns: _from_zero_dim_arrays_to_scalar, ret, tuple, np_frontend