def select(self, **restrictions):
        # If there are no restrictions, then return all edges.
        if restrictions=={}: return iter(self._edges)

        # Find the index corresponding to the given restrictions.
        restr_keys = sorted(restrictions.keys())
        restr_keys = tuple(restr_keys)

        # If it doesn't exist, then create it.
        if restr_keys not in self._indexes:
            self._add_index(restr_keys)

        vals = tuple(restrictions[key] for key in restr_keys)
        return iter(self._indexes[restr_keys].get(vals, []))
Return an iterator over the edges in this chart.  Any
dataset/ETHPy150Open nltk/nltk/nltk/parse/chart.py/Chart.select