def METHOD_NAME(self, patched_Popen, patched_log, patched_check_and_process_byes):
    expected_output = f"Line 1{os.linesep}Line 2"
    mock_pattern = Mock()
    mock_stream_writer = Mock()
    mock_process = Mock()
    mock_process.stdout = StringIO(expected_output)
    mock_process.wait.return_value = 0
    mock_process.stderr = []
    patched_Popen.return_value.__enter__.return_value = mock_process
    patched_log.getEffectiveLevel.return_value = logging.INFO
    invoke_subprocess_with_loading_pattern({"args": ["ls"], "stdout": DEVNULL}, mock_pattern, mock_stream_writer)
    patched_Popen.assert_called_once_with(args=["ls"], stdout=DEVNULL, stderr=PIPE)