code: def ensure_running_server(
      host=defaults.host,
      port=defaults.port,
      dask_scheduler_file=None,
      start_local_cuda_cluster=False,
  ):
      """
      Returns a tuple containg a CugraphService instance and a Popen instance for
      the server subprocess. If a server is found running, the Popen instance
      will be None and no attempt will be made to start a subprocess.
      """
      host = "localhost"
      port = 9090
      client = CugraphServiceClient(host, port)
      server_process = None
  
      try:
          client.uptime()
          print(
              "FOUND RUNNING SERVER, ASSUMING IT SHOULD BE USED FOR TESTING!"
          )
  
      except CugraphServiceError:
          # A server was not found, so start one for testing then stop it when
          # testing is done.
          server_process = start_server_subprocess(
              host=host,
              port=port,
              start_local_cuda_cluster=start_local_cuda_cluster,
              dask_scheduler_file=dask_scheduler_file,
          )
  
      return (client, server_process)
  
file_path: cugraph/python/cugraph-service/server/cugraph_service_server/testing/utils.py
imports: import sys
  import os
  import subprocess
  import time
  from tempfile import TemporaryDirectory
  from pathlib import Path
  from cugraph_service_client import CugraphServiceClient, defaults
  from cugraph_service_client.exceptions import CugraphServiceError
label_desc: Use image node_id 3 for calling a global function with example usage: ensure_running_server(host, port, dask_scheduler_file, start_local_cuda_cluster) and returns: client,  server_process