def get(self):
        self._update_produced_offsets()
        self._update_group_offsets()

        lags = {}
        for partition in self._client.get_partition_ids_for_topic(self._topic):
            produced = self._offsets.produced[partition]
            lag = produced - self._offsets.commit[partition] if self._offsets.commit[partition] else 0.0
            lags[partition] = lag
        return lags
Test for #12658 - Tests with ImportError's shouldn't fail silently
dataset/ETHPy150Open scrapinghub/frontera/frontera/contrib/messagebus/kafka/__init__.py/OffsetsFetcher.get--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/test_runner/tests.py/ModulesTestsPackages.test_import_error