def expected_stop(self, running=None, not_running=None):
        if running is None:
            running = self.cluster.all_internal_hosts()
            if not_running:
                for host in not_running:
                    running.remove(host)

        expected_output = []
        for host in running:
            expected_output += [r'\[%s\] out: ' % host,
                                r'\[%s\] out: Stopped .*' % host,
                                r'\[%s\] out: Stopping presto' % host]
        if not_running:
            for host in not_running:
                expected_output += [r'\[%s\] out: ' % host,
                                    r'\[%s\] out: Not '
                                    r'(running|runnning)' % host,
                                    r'\[%s\] out: Stopping presto' % host]

        return expected_output
dataset/ETHPy150Open prestodb/presto-admin/tests/product/base_product_case.py/BaseProductTestCase.expected_stop/original