code: def _stop_mocked_service_and_print_stderr(proc):
      proc.terminate()
      stderr = proc.stderr.read().decode()
      print(stderr, file=sys.stderr)
  
imports: import json
  import os
  import subprocess
  import sys
  import time
  import pydantic
  import pytest
  import requests
  from modelkit.core.library import ModelLibrary
  from modelkit.core.models.distant_model import AsyncDistantHTTPBatchModel, AsyncDistantHTTPModel, DistantHTTPBatchModel, DistantHTTPModel
  from tests import TEST_DIR
label_desc: Use image node_id 2 for calling a global function with example usage: _stop_mocked_service_and_print_stderr(proc) without return types