code: def map(
      fn: Callable,
      constant: Optional[Dict[str, Any]] = None,
      unique: Optional[Dict[str, Iterable[Any]]] = None,
      mean: bool = False,
  ) -> List:
      """Apply a function on each item of an iterable x.
  
      Parameters
      ----------
      fn
          The function to map onto x.
      constant
          keyword arguments which remain constant between each function call.
          Default is ``None``.
      unique
          keyword arguments which are unique for each function call. Default is ``None``.
      mean
          Whether to compute the mean across the return values, and return this mean.
          Default is ``False``.
  
      Returns
      -------
      ret
          x following the application of fn to each of its iterated items.
  
      Examples
      --------
      With :code:`int` inputs:
  
      >>> def special_square(x : float) -> float : return np.square(x)
      >>> results = ivy.map(fn = special_square,
      ...                   constant = None,
      ...                   unique = {'x' : [1,2,3]},
      ...                   mean = False)
      >>> print(results)
      [1, 4, 9]
  
      >>> results = ivy.map(fn = special_square,
      ...                   constant = None,
      ...                   unique = {'x':[0,1,2]},
      ...                   mean = True)
      >>> print(results)
      1.6666666666666667
  
      >>> def special_pow(x:float,y:float) ->float : return np.power(x,y)
      >>> results = ivy.map(fn = special_pow,
      ...                   constant = {'y':[0,1]},
      ...                   unique = {'x':[1,2,3]},
      ...                   mean = False)
      >>> print(results)
      [array([1,1]),
      array([1,2]),
      array([1,3])]
  
      >>> results = ivy.map(fn = special_pow,
      ...                   constant = {'y':[0,1]},
      ...                   unique = {'x':[1,2,3]},
      ...                   mean = True)
      >>> print(results)
      [1. 2.]
  
      With float inputs:
  
      >>> def linear_model(w:float, x:float, b:float) -> float: return w*x + b
      >>> results = ivy.map(fn = linear_model,
      ...                   constant = {'w':10., 'b':1.},
      ...                   unique = {'x':[0.,1.,2.]},
      ...                   mean = False)
      >>> print(results)
      [1.0, 11.0, 21.0]
  
      With :class:`ivy.Array` inputs:
  
      >>> results = ivy.map(fn = linear_model,
      ...    constant = {'w':ivy.array([1.,0.,1.]), 'b':ivy.array([0.,10.,100.])},
      ...    unique = {'x':[ivy.array([0.,1.,0.]), ivy.array([1.,1.,1.])]},
      ...    mean = False)
      >>> print(results)
      [ivy.array([0., 10., 100.]),
      ivy.array([1., 10., 101.])]
  
      >>> results = ivy.map(fn = linear_model,
      ...    constant = {'w':ivy.array([1.,0.,1.]), 'b':ivy.array([0.,10.,100.])},
      ...    unique = {'x':[ivy.array([0.,1.,0.]), ivy.array([1.,1.,1.])]},
      ...    mean = True)
      >>> print(results)
      ivy.array([  0.5,  10. , 100. ])
      """
      c = ivy.default(constant, {})
      u = ivy.default(unique, {})
      rets = [
          r
          for r in _map(
              lambda *uv: fn(**dict(**c, **dict(zip(u.keys(), uv)))),
              *u.values(),
          )
      ]
      if mean:
          rets = sum(rets) / len(rets)
  
      return rets
  
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 13 for calling a global function with example usage: map(fn, constant, unique, mean) and returns: rets