def _find(xs, predicate):
    """Locate an item in a list based on a predicate function.

    Args:
        xs (list) : List of  data
        predicate (function) : Function taking a data item and returning bool

    Returns:
        (object|None) : The first list item that predicate returns True for or None
    """
    for x in xs:
        if predicate(x):
            return x
    return None