@classmethod
def _cross_match(cls, container, items_to_match):
    """Find all possible matches as sets of positions.

        Look through each item and list every position in the `container` that
        they match.
        :yields: Sets of positions which match a particular item
        """
    for item in items_to_match:
        constraint_set = set()
        for other_pos, other_item in enumerate(container):
            if item == other_item:
                constraint_set.add(other_pos)
        yield constraint_set
