code: def test_get_child_process_ids(m_subprocess):
      cmd = "pgrep -P pid".split()
      process_mock = Mock()
      attrs = {
          "communicate.return_value": (b"\n", False),
          "returncode": 0,
      }
      process_mock.configure_mock(**attrs)
      m_subprocess.Popen.return_value = process_mock
      sagemaker.local.utils.get_child_process_ids("pid")
      m_subprocess.Popen.assert_called_with(
          cmd, stdout=m_subprocess.PIPE, stderr=m_subprocess.PIPE
      )
  
imports: from __future__ import absolute_import
  import os
  import errno
  import pytest
  import json
  from mock import patch, Mock, mock_open
  import sagemaker.local.utils
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 8 for calling a global function with example usage: test_get_child_process_ids(m_subprocess) without return types