def METHOD_NAME(dicts):
    try:
        return (
            dict(itertools.izip(dicts, x))
            for x in itertools.product(*dicts.itervalues())
        )
    except AttributeError:
        # python 3
        return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values()))