code: def test_snapshot_created_on_start_and_stop():
      """
      Validates that startup .cfg & shutdown.cfg are created upon start & stop.
      """
      test_utils.delete_all_snapshots()
      test_utils.start_torchserve()
      test_utils.stop_torchserve()
      assert len(glob.glob("logs/config/*startup.cfg")) == 1
      if platform.system() != "Windows":
          assert len(glob.glob("logs/config/*shutdown.cfg")) == 1
  
imports: import platform
  import time
  import os
  import glob
  import requests
  import json
  import test_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_snapshot_created_on_start_and_stop() without return types