def set(self, value, priority):
        """Sets value if priority is higher or equal than current priority."""
        if priority >= self.priority:
            if isinstance(self.value, BaseSettings):
                value = BaseSettings(value, priority=priority)
            self.value = value
            self.priority = priority
Sets value if priority is higher or equal than current priority.
stackoverflow/venv/lib/python3.6/site-packages/scrapy/settings/__init__.py