code: def test_server_timeout_shutdown():
      # Configure server to shutdown after 10 seconds without
      # calls to ensure_orca_server
      pio.orca.config.timeout = 10
      pio.orca.ensure_server()
      server_port = pio.orca.status.port
      server_pid = pio.orca.status.pid
  
      # Build server URL
      server_url = "http://localhost:%s" % server_port
  
      # Check that server process number is valid
      assert psutil.pid_exists(server_pid)
  
      for i in range(3):
          # Sleep for just under 10 seconds
          time.sleep(8)
          assert ping_pongs(server_url)
          assert psutil.pid_exists(server_pid)
          pio.orca.ensure_server()
  
      # Sleep just over 10 seconds, server should then auto shutdown
      time.sleep(11)
  
      # Check that server process number no longer exists
      assert not psutil.pid_exists(server_pid)
  
      # Check that ping is no longer answered
      assert not ping_pongs(server_url)
  
imports: from unittest import TestCase
  import plotly.io
  import subprocess
  import os
  from packaging.version import Version
  import requests
  import time
  import psutil
  import pytest
  import plotly.graph_objects
  from plotly.io._orca import find_open_port, which, orca_env
label_desc: Use image node_id 9 for calling a global function with example usage: test_server_timeout_shutdown() without return types