# Path: ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_protocol.py
# def create_protocol():
#     class CustomProtocol(AsyncSubprocessProtocol):
#         def __init__(self, *args, **kwargs):
#             self.stdout_buffer = b""
#             self.stderr_buffer = b""
#             AsyncSubprocessProtocol.__init__(self, *args, **kwargs)
# 
#         def on_stdout_received(self, data):
#             self.stdout_buffer += data
# 
#         def on_stderr_received(self, data):
#             self.stderr_buffer += data
#     return CustomProtocol


from osrf_pycommon.process_utils import asyncio
from osrf_pycommon.process_utils.async_execute_process import async_execute_process
from osrf_pycommon.process_utils import get_loop
from .impl_aep_protocol import create_protocol


loop = get_loop()


@asyncio.coroutine
def run(cmd, **kwargs):
    transport, protocol = yield from async_execute_process(

# Path: ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_protocol.py
# def create_protocol():
#     class CustomProtocol(AsyncSubprocessProtocol):
#         def __init__(self, *args, **kwargs):
#             self.stdout_buffer = b""
#             self.stderr_buffer = b""
#             AsyncSubprocessProtocol.__init__(self, *args, **kwargs)
# 
#         def on_stdout_received(self, data):
#             self.stdout_buffer += data
# 
#         def on_stderr_received(self, data):
#             self.stderr_buffer += data
#     return CustomProtocol


# Path: ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_asyncio.py
from osrf_pycommon.process_utils import asyncio
from osrf_pycommon.process_utils.async_execute_process import async_execute_process
from osrf_pycommon.process_utils import get_loop
from .impl_aep_protocol import create_protocol



loop = get_loop()


@asyncio.coroutine
def run(cmd, **kwargs):
    transport, protocol = yield from async_execute_process(

        create_protocol(), cmd, **kwargs)