@classmethod
def _contains_in_order(cls, container, items_to_match):
    """Check if each item can be found in order in the container.

        :param container: An iterable of items to check over
        :param items_to_match: An iterable of items to try and match
        :return: A boolean indicating whether each item can be matched
        """
    try:
        container = list(container)
    except TypeError:
        return False
    last_index = None
    for item in items_to_match:
        try:
            last_index = (container.index(item) if last_index is None else
                container.index(item, last_index)) + 1
        except ValueError:
            return False
    return True
