def __iter__(self):
        for p in self.param_grid:
            # Always sort the keys of a dictionary, for reproducibility
            items = sorted(p.items())
            if not items:
                yield {}
            else:
                keys, values = zip(*items)
                for v in product(*values):
                    params = dict(zip(keys, v))
                    yield params
Check if the field value can be fetched from a parent field already
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/grid_search.py/ParameterGrid.__iter__--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/query_utils.py/DeferredAttribute._check_parent_chain