def get_used_sites(self):
        try:
            site_ids = [x[0] for x in self._edit_session.query(distinct(Series.site_id)).all()]
        except:
            site_ids = None

        if not site_ids:
            return None

        Sites = []
        for site_id in site_ids:
            Sites.append(self._edit_session.query(Site).filter_by(id=site_id).first())

        return Sites
Set up the monitor to a given state, to simplify tests.
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/odmservices/series_service.py/SeriesService.get_used_sites--crossover with--dataset/ETHPy150Open dustin/twitty-twister/twittytwister/test/test_twitter.py/TwitterMonitorTest.setUpState