code: def test_detect_process(self):
      if sys.platform == "win32":
          cmds = ["timeout", "360000"]
      else:
          cmds = ["sleep", "360000"]
      process = Popen(cmds, stdout=PIPE, stderr=STDOUT)
      self.assertTrue(detect_process(process.pid))
      kill_command(process.pid)
  
file_path: nni/test/ut/tools/nnictl/test_common_utils.py
imports: from pathlib import Path
  from subprocess import Popen, PIPE, STDOUT
  import sys
  from unittest import TestCase, main, skipIf
  from mock.restful_server import init_response
  from nni.tools.nnictl.command_utils import kill_command
  from nni.tools.nnictl.common_utils import get_yml_content, get_json_content, detect_process
label_desc: Use image node_id 4 for calling the CommonUtilsTestCase obj's underlying member method code with example usage: obj.test_detect_process() without return types