code: def test_jemalloc_ray_start(monkeypatch, ray_start_cluster):
      def check_jemalloc_enabled(pid=None):
          if pid is None:
              pid = os.getpid()
          pmap = subprocess.run(
              ["pmap", str(pid)],
              check=True,
              text=True,
              stdout=subprocess.PIPE,
          )
          return "libjemalloc.so" in pmap.stdout
  
      # Firstly, remove the LD_PRELOAD and make sure
      # jemalloc is loaded.
      monkeypatch.delenv("LD_PRELOAD", False)
      cluster = ray_start_cluster
      node = cluster.add_node(num_cpus=1)
  
      # Make sure raylet/gcs/worker all have jemalloc
      assert check_jemalloc_enabled(
          node.all_processes[ray_constants.PROCESS_TYPE_GCS_SERVER][
              0
          ].process.pid
      )
      assert check_jemalloc_enabled(
          node.all_processes[ray_constants.PROCESS_TYPE_RAYLET][
              0
          ].process.pid
      )
      assert not ray.get(ray.remote(check_jemalloc_enabled).remote())
  
      ray.shutdown()
      cluster.shutdown()
  
      monkeypatch.setenv("LD_PRELOAD", "")
      node = cluster.add_node(num_cpus=1)
      # Make sure raylet/gcs/worker all have jemalloc
      assert not check_jemalloc_enabled(
          node.all_processes[ray_constants.PROCESS_TYPE_GCS_SERVER][
              0
          ].process.pid
      )
      assert not check_jemalloc_enabled(
          node.all_processes[ray_constants.PROCESS_TYPE_RAYLET][
              0
          ].process.pid
      )
      assert not ray.get(ray.remote(check_jemalloc_enabled).remote())
  
imports: import os
  import sys
  import time
  import pytest
  import ray
  import ray._private.ray_constants
  from ray._private.test_utils import Semaphore, enable_external_redis, client_test_enabled, run_string_as_driver, wait_for_condition, get_gcs_memory_used, run_string_as_driver_nonblocking
  from ray.experimental.internal_kv import _internal_kv_list
  from ray.tests.conftest import call_ray_start
  import subprocess
  import psutil
label_desc: Use image node_id 17 for calling a global function with example usage: test_jemalloc_ray_start(monkeypatch, ray_start_cluster) and returns: unknown