def _find_used(activity, predicate):

    for resource in activity['used']:
        if predicate(resource):
            return resource
    return None
_flatten a sequence of sequences into a single list
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseclient/utils.py/_find_used--crossover with--dataset/ETHPy150Open codeinthehole/purl/purl/template.py/_flatten