def get_smallest_gap(self, db, service):
        gaps = list(db.servers.find({'instance_id': '', 'service': service}))
        if len(gaps) > 0:
            # There is a gap
            logging.info('Gap in hostnames detected.')
            gaps.sort(key=operator.itemgetter('hostname'))

            return gaps[0]['hostname']
Walk the object tree, showing circular referents.
dataset/ETHPy150Open urbanairship/aerostat/aerostat/registrar.py/Registrar.get_smallest_gap--crossover with--dataset/ETHPy150Open munhitsu/django-dowser/django_dowser/reftree.py/CircularReferents.walk