def __getattr__(self, attr):
        if attr not in self.defaults.keys():
            raise AttributeError("Invalid HEDWIG setting: '%s'" % attr)

        try:
            # Check if present in user settings
            val = self.user_settings[attr]
        except __HOLE__:
            # Fall back to defaults
            val = self.defaults[attr]

        # Cache the result
        setattr(self, attr, val)
        return val
dataset/ETHPy150Open ofpiyush/hedwig-py/hedwig/core/settings.py/Settings.__getattr__