def load(cls, dirname=None, locales=None, domain=DEFAULT_DOMAIN):
        if locales is not None:
            if not isinstance(locales, (list, tuple)):
                locales = [locales]
            locales = [str(locale) for locale in locales]
        if not domain:
            domain = cls.DEFAULT_DOMAIN
        filename = gettext.find(domain, dirname, locales)
        if not filename:
            return gettext.NullTranslations()
        return cls(fileobj=open(filename, 'rb'), domain=domain)
Assert that a par_loop locks each Dat argument for writing.
dataset/ETHPy150Open ibagrak/algae/gae/libs/babel/support.py/Translations.load--crossover with--dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py/TestDirectLoop.test_parloop_should_set_ro_flag