def first_index(lst, predicate):
    for i, e in enumerate(lst):
        if predicate(e):
            return i
    return None
Return the index of the first element that matches a predicate.
dataset/ETHPy150Open openstack/rally/rally/common/utils.py/first_index