def _find_startswith(x, s):
    """Finds the index of a sequence that starts with s or returns -1.
    """
    for i, elem in enumerate(x):
        if elem.startswith(s):
            return i
    return -1