code: def test_log_location_var_snapshot_enabled():
      """
      Validates that non metrics logs get saved in directory configured via LOG_LOCATION
      environment variable.
      """
      # We stop torchserve here so that we can set LOG_LOCATION in environment variable and rerun torchserve
      test_utils.stop_torchserve()
      os.environ["LOG_LOCATION"] = test_utils.ROOT_DIR
      run_log_location_var(no_config_snapshots=False)
      requests.post(
          "http://127.0.0.1:8081/models?url=mnist_custom_metrics.mar"
      )
      # We stop torchserve again here so that we can remove the LOG_LOCATION setting from environment variable
      test_utils.stop_torchserve()
      print("Waiting to stop")
      time.sleep(15)
      del os.environ["LOG_LOCATION"]
  
      # In case of snapshot enabled, we get these three config files additionally in the custom directory
      assert (
          len(
              glob.glob(
                  path.join(test_utils.ROOT_DIR, "config/*startup.cfg")
              )
          )
          >= 1
      )
      if platform.system() != "Windows":
          assert (
              len(
                  glob.glob(
                      path.join(
                          test_utils.ROOT_DIR, "config/*shutdown.cfg"
                      )
                  )
              )
              >= 1
          )
      assert (
          len(
              glob.glob(
                  path.join(test_utils.ROOT_DIR, "config/*snap*.cfg")
              )
          )
          >= 1
      )
      for f in glob.glob(path.join(test_utils.ROOT_DIR, "*.log")):
          print("-------------Deleting " + f)
          os.remove(f)
  
      shutil.rmtree(path.join(test_utils.ROOT_DIR, "config"))
  
      # Remove any old snapshots
      test_utils.delete_all_snapshots()
  
imports: import glob
  import os
  import platform
  import re
  import shutil
  import subprocess
  import time
  from os import path
  import requests
  import test_utils
label_desc: Use image node_id 14 for calling a global function with example usage: test_log_location_var_snapshot_enabled() without return types