def ci_find_one()

in hpcpack-autoscaler/src/cyclecloud-hpcpack/commonutil.py [0:0]


def ci_find_one(source: Iterable[T], target_value:str, target_func:Callable[[T], str]) -> Optional[T]:
    for i in source:
        if ci_equals(target_value, target_func(i)):
            return i
    return None