def get_docs_to_commit(self):
        try:
            spec = {'synced': False}
            fields = {'_id': 0}
            cur = self.db.docs.find(spec, fields)
        except Exception as e:
            raise DatabaseException(e)
        return list(cur)
def flux_density(isa, subreg=[], ax=0):
    """plot flux density of NC/I7/ISA7 model
    Args:
      isa: Isa7/NC object
    """
    if subreg:
        if isinstance(subreg, list):
            sr = subreg
        else:
            sr = [subreg]
        elements = [e for s in sr for se in isa.get_subregion(s).elements()
                    for e in se]
    else:
        elements = [e for e in isa.elements]

    fluxd = np.array([np.linalg.norm(e.flux_density()) for e in elements])
    _contour(ax, f'Flux Density T', elements, fluxd)
    logger.info("Max flux dens %f", np.max(fluxd))