def expander(callable_, collection):
    """
    Takes a callable object and calls it repeatedly with arguments generated
    by performing expansion on elements from the iterable collection.  This is
    similar to the starmap function, although expander supports both
    positional and keyword argument expansion.
    
    :param callable_: The callable object which should receive arguments from
        items in the collection.
    
    :param collection: an iterable providing iterables of positional or keyword
        arguments.
    """
    for item in collection:
        if isinstance(item, dict):
            yield callable_(**item)
        else:
            yield callable_(*item)
