code: def nested_multi_map(
      func: Callable,
      nests: List[Iterable],
      index_chains=None,
      to_apply=True,
      prune_unapplied=False,
      index_chain="",
      config=None,
      to_ivy=True,
  ):
      """Apply function to all array values from a collection of identically
      structured ivy arrays.
  
      Parameters
      ----------
      func
          Function to apply to each nest entry.
      nest
          nests to map.
      index_chains
          The key-chains to apply or not apply the method to. Default is ``None``.
      to_apply
          If True, the method will be applied to index_chains, otherwise index_chains will
          be skipped. Default is ``True``.
      prune_unapplied
          Whether to prune index_chains for which the function was not applied,
          otherwise the leftmost nest value is used. Default is ``False``.
      index_chain
          Chain of keys for this dict entry (Default value = '')
      config
          The configuration for the nests. Default is the same as nest0.
      to_ivy
          convert the output to ivy_arrays. Default is ``True``
  
      Returns
      -------
          nest containing the result of the function. The structure of the output is the
          same as the input with the result of the function applied to each applicable
          leaf and the value at that leaf in the first nest for a non-applicable leaf if
          prune_unapplied is False else unapplied leaves are pruned.
      """
      nest0 = None
      for nest in nests:
          if isinstance(nest, (tuple, list, dict)):
              nest0 = nest
              break
      if isinstance(nest0, (list, tuple)):
          return_nest = []
      elif isinstance(nest0, dict):
          return_nest = {}
      else:
          return_nest = None
      if nest0 is not None:
          is_dict = isinstance(nest0, dict)
          for index, val in enumerate(nest0):
              if is_dict:
                  values = [
                      (
                          nest[index]
                          if isinstance(nest, (tuple, list))
                          else nest[val]
                          if isinstance(nest, dict)
                          else nest
                      )
                      for nest in nests
                  ]
              else:
                  values = [
                      (
                          nest[index]
                          if isinstance(nest, (tuple, list))
                          else nest[list(nest)[index]]
                          if isinstance(nest, dict)
                          else nest
                      )
                      for nest in nests
                  ]
              value0 = values[0]
              if is_dict:
                  key = (
                      str(index)
                      if isinstance(nest, (tuple, list))
                      else val
                  )
              else:
                  key = (
                      str(index)
                      if isinstance(nest, (tuple, list))
                      else list(nest)[index]
                  )
              this_index_chain = (
                  key if index_chain == "" else f"{index_chain}/{key}"
              )
              ret = ivy.nested_multi_map(
                  func,
                  values,
                  index_chains,
                  to_apply,
                  prune_unapplied,
                  this_index_chain,
                  config,
                  to_ivy,
              )
              if ret is not None:
                  if to_ivy and isinstance(
                      nest, (ivy.Array, ivy.NativeArray)
                  ):
                      ret = ivy.array(ivy.to_list(ret))
                  (
                      return_nest.append(ret)
                      if isinstance(return_nest, (list))
                      else return_nest.update(
                          {val if is_dict else list(nest)[index]: ret}
                      )
                  )
      else:
          values = nests
          value0 = values[0]
          this_index_chain = index_chain
  
          def _found_in_index_chains(this_index_chain, index_chains):
              if index_chains is None:
                  return False
              for index_chain in index_chains:
                  if this_index_chain.startswith(index_chain):
                      return True
              return False
  
          if index_chains is not None:
              found = _found_in_index_chains(
                  this_index_chain, index_chains
              )
              if (found and not to_apply) or (not found and to_apply):
                  if prune_unapplied:
                      return return_nest
                  if ivy.is_array(value0):
                      if not to_ivy:
                          value0 = ivy.array(value0)
                  (
                      return_nest.append(value0)
                      if isinstance(return_nest, list)
                      else (
                          return_nest.update({this_index_chain: value0})
                          if isinstance(return_nest, dict)
                          else return_nest
                      )
                  )
                  return (
                      tuple(return_nest)
                      if isinstance(nest, tuple)
                      else (
                          ivy.Container(return_nest)
                          if ivy.is_ivy_container(nest)
                          else return_nest
                      )
                  )
          ret = func(values, this_index_chain)
          if to_ivy and ret is not None:
              if isinstance(nest, (ivy.Array, ivy.NativeArray)):
                  return ret
              else:
                  return ivy.array(ret)
          else:
              return ret
      if prune_unapplied and len(return_nest) == 0:
          return None
      return (
          tuple(return_nest)
          if isinstance(nest0, tuple)
          else ivy.Container(return_nest)
          if ivy.is_ivy_container(nest0)
          else return_nest
      )
  
imports: from builtins import map
  from typing import Callable, Any, Union, List, Tuple, Optional, Dict, Iterable, Sequence
  from collections import UserDict, OrderedDict
  import ivy
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 17 for calling a global function with example usage: nested_multi_map(func, nests, index_chains, to_apply, prune_unapplied, index_chain, config, to_ivy) and returns: unknown, None, False, ret, False, unknown, ret, ivy, True, return_nest