for l in labels:
    for k, v in properties.items():
        if results == None:
            genNodes = lambda l, k, v: graph.find(l, property_key=k,
                property_value=v)
results = [r for r in genNodes(l, k, v)]
continue
prevResults = results
results = [n for n in genNodes(l, k, v) if n in prevResults]
return results
py2neo how to retrieve a node based on node's property?