def __getattr__(self, name):
        settings_module = os.environ.get('MONGOREST_SETTINGS_MODULE')

        if not settings_module:
            self._settings_module = None
            self._settings = copy.deepcopy(DEFAULT)
        if settings_module and self._settings_module != settings_module:
            self._settings_module = settings_module

            self._settings = dict(
                self._settings, **dict(
                    (name, setting) for (name, setting) in inspect.getmembers(
                        pydoc.locate(settings_module)
                    ) if name.isupper()
                )
             )

        try:
            return self._settings[name]
        except __HOLE__:
            raise AttributeError('Invalid setting: \'{0}\''.format(name))
dataset/ETHPy150Open lvieirajr/mongorest/mongorest/settings.py/Settings.__getattr__