def stop_nodes(self, by_browser=None):
        if by_browser is not None and not by_browser in self.VALID_BROWSERS:
            # raise exception
            return False

        browser = ''
        if self.VALID_BROWSERS in by_browser:
            browser = by_browser + '-'

        containers = self.adapter.client.containers()

        for container in containers:
            if browser + "node" in container['Image']:
                self.adapter.client.stop(container['Id'])
                self.adapter.client.remove_container(container['Id'])

        return True
dataset/ETHPy150Open brady-vitrano/dsgrid/dsgrid/hub.py/GridHub.stop_nodes/swapped operands of `in`