def gather(nodes, *attributes, transpose=False):
    """
    Gather attributes from each node in the provided list.
    """
    results = []
    for attr in attributes:
        if attr is None: results.append([None])
        else: results.append([node[attr] for node in nodes])
    if len(results) == 1: return results[0]
    if transpose: return list(zip(*results))
    return results