code: def splat(func):
      """
      Wrap func to expect its parameters to be passed positionally in a tuple.
  
      Has a similar effect to that of ``itertools.starmap`` over
      simple ``map``.
  
      >>> import itertools, operator
      >>> pairs = [(-1, 1), (0, 2)]
      >>> _ = tuple(itertools.starmap(print, pairs))
      -1 1
      0 2
      >>> _ = tuple(map(splat(print), pairs))
      -1 1
      0 2
  
      The approach generalizes to other iterators that don't have a "star"
      equivalent, such as a "starfilter".
  
      >>> list(filter(splat(operator.add), pairs))
      [(0, 2)]
  
      Splat also accepts a mapping argument.
  
      >>> def is_nice(msg, code):
      ...     return "smile" in msg or code == 0
      >>> msgs = [
      ...     dict(msg='smile!', code=20),
      ...     dict(msg='error :(', code=1),
      ...     dict(msg='unknown', code=0),
      ... ]
      >>> for msg in filter(splat(is_nice), msgs):
      ...     print(msg)
      {'msg': 'smile!', 'code': 20}
      {'msg': 'unknown', 'code': 0}
      """
      return functools.wraps(func)(
          functools.partial(_splat_inner, func=func)
      )
  
imports: import collections.abc
  import functools
label_desc: Use image node_id 4 for calling a global function with example usage: splat(func) and returns: functools