def METHOD_NAME(patch_subprocess_running_ping):
    def inner(ping_output):
        mock_ping = MagicMock()
        mock_ping.communicate = MagicMock(return_value=(ping_output, ""))
        patch_subprocess_running_ping(mock_ping)
    return inner