'Generate (key, value) pairs from the config module matching prefix.
Args:
prefix: A prefix string ending in \'_\', e.g. \'mylib_\'.
Yields:
(key, value) pairs where key is the configuration name with
prefix removed, and value is the corresponding value.'

def _pairs(self, prefix):

    self._lock.acquire()
    try:
        mapping = getattr(self._module, '__dict__', None)
        if (not mapping):
            return
        items = mapping.items()
    finally:
        self._lock.release()
    nskip = len(prefix)
    for (key, value) in items:
        if key.startswith(prefix):
            (yield (key[nskip:], value))
