def get_atoms_for_flow(flow, persistence_backend):
    """
    Gets all atoms for a flow
    :param obj flow: A TaskFlow flow
    :param obj persistence_backend: A connection to the persistence backend
    :return iter[obj, ..] all_atoms: An iterable of atom objects
    """
    return persistence_backend.get_atoms_for_flow(flow.uuid)