code: def test_node_physical_stats(enable_test_module, shutdown_only):
      addresses = ray.init(include_dashboard=True, num_cpus=6)
  
      @ray.remote(num_cpus=1)
      class Actor:
          def getpid(self):
              return os.getpid()
  
      actors = [Actor.remote() for _ in range(6)]
      actor_pids = ray.get([actor.getpid.remote() for actor in actors])
      actor_pids = set(actor_pids)
  
      webui_url = addresses["webui_url"]
      assert wait_until_server_available(webui_url) is True
      webui_url = format_web_url(webui_url)
  
      def _check_workers():
          try:
              resp = requests.get(
                  webui_url + "/test/dump?key=node_physical_stats"
              )
              resp.raise_for_status()
              result = resp.json()
              assert result["result"] is True
              node_physical_stats = result["data"]["nodePhysicalStats"]
              assert len(node_physical_stats) == 1
              current_stats = node_physical_stats[addresses["node_id"]]
              # Check Actor workers
              current_actor_pids = set()
              for worker in current_stats["workers"]:
                  if "ray::Actor" in worker["cmdline"][0]:
                      current_actor_pids.add(worker["pid"])
              assert current_actor_pids == actor_pids
              # Check raylet cmdline
              assert "raylet" in current_stats["cmdline"][0]
              return True
          except Exception as ex:
              logger.info(ex)
              return False
  
      wait_for_condition(_check_workers, timeout=10)
  
imports: import logging
  import os
  import sys
  import requests
  import numpy
  import time
  import copy
  import pytest
  from collections import defaultdict
  from multiprocessing import Process
  from unittest.mock import MagicMock
  from google.protobuf import text_format
  import psutil
  import ray
  from mock import patch
  from ray._private import ray_constants
  from ray._private.metrics_agent import fix_grpc_metric
  from ray._private.test_utils import fetch_prometheus, format_web_url, wait_for_condition, wait_until_server_available
  from ray.dashboard.modules.reporter.reporter_agent import ReporterAgent
  from ray.dashboard.tests.conftest import *
  from ray.dashboard.utils import Bunch
  from ray.core.generated.metrics_pb2 import Metric
label_desc: Use image node_id 2 for calling a global function with example usage: test_node_physical_stats(enable_test_module, shutdown_only) and returns: os, True, False