code: def test_get_system_memory():
      # cgroups v1, set
      with tempfile.NamedTemporaryFile("w") as memory_limit_file:
          memory_limit_file.write("100")
          memory_limit_file.flush()
          assert (
              ray._private.utils.get_system_memory(
                  memory_limit_filename=memory_limit_file.name,
                  memory_limit_filename_v2="__does_not_exist__",
              )
              == 100
          )
  
      # cgroups v1, high
      with tempfile.NamedTemporaryFile("w") as memory_limit_file:
          memory_limit_file.write(str(2**64))
          memory_limit_file.flush()
          psutil_memory_in_bytes = psutil.virtual_memory().total
          assert (
              ray._private.utils.get_system_memory(
                  memory_limit_filename=memory_limit_file.name,
                  memory_limit_filename_v2="__does_not_exist__",
              )
              == psutil_memory_in_bytes
          )
      # cgroups v2, set
      with tempfile.NamedTemporaryFile("w") as memory_max_file:
          memory_max_file.write("100\n")
          memory_max_file.flush()
          assert (
              ray._private.utils.get_system_memory(
                  memory_limit_filename="__does_not_exist__",
                  memory_limit_filename_v2=memory_max_file.name,
              )
              == 100
          )
  
      # cgroups v2, not set
      with tempfile.NamedTemporaryFile("w") as memory_max_file:
          memory_max_file.write("max")
          memory_max_file.flush()
          psutil_memory_in_bytes = psutil.virtual_memory().total
          assert (
              ray._private.utils.get_system_memory(
                  memory_limit_filename="__does_not_exist__",
                  memory_limit_filename_v2=memory_max_file.name,
              )
              == psutil_memory_in_bytes
          )
  
imports: import glob
  import logging
  import multiprocessing
  import os
  import sys
  import tempfile
  import time
  from unittest import mock
  import numpy
  import psutil
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  import ray._private.utils
  import ray.cluster_utils
  import ray.util.accelerators
  from ray._private.test_utils import wait_for_condition
  from ray.dashboard import k8s_utils
  from ray.runtime_env import RuntimeEnv
label_desc: Use image node_id 8 for calling a global function with example usage: test_get_system_memory() without return types