code: def get_register_agents_number(webui_url):
      response = requests.get(webui_url + "/internal/node_module")
      response.raise_for_status()
      result = response.json()
      data = result["data"]
      return data["registeredAgents"]
  
imports: from pathlib import Path
  import tempfile
  import time
  import os
  from ray.dashboard.modules.job.pydantic_models import JobType
  import requests
  import pytest
  import psutil
  import sys
  from typing import Dict, Optional, Tuple
  from unittest.mock import Mock, patch
  from ray._private.ray_constants import DEFAULT_DASHBOARD_AGENT_LISTEN_PORT
  from ray._private.test_utils import format_web_url, wait_for_condition, wait_until_server_available
  from ray.dashboard.modules.dashboard_sdk import ClusterInfo, DEFAULT_DASHBOARD_ADDRESS, parse_cluster_info
  from ray.dashboard.modules.job.sdk import JobSubmissionClient, JobStatus
  from ray.dashboard.tests.conftest import *
  from ray.dashboard.consts import RAY_JOB_ALLOW_DRIVER_ON_WORKER_NODES_ENV_VAR
  from ray.tests.conftest import _ray_start
  import ray
  import ray.experimental.internal_kv
  from ray.util.state import list_nodes
label_desc: Use image node_id 7 for calling a global function with example usage: get_register_agents_number(webui_url) and returns: data