code: def check_free_memory(free_mb):
      """
      Check *free_mb* of memory is available, otherwise do pytest.skip
      """
      import pytest
  
      try:
          mem_free = _parse_size(os.environ["SCIPY_AVAILABLE_MEM"])
          msg = "{} MB memory required, but environment SCIPY_AVAILABLE_MEM={}".format(
              free_mb, os.environ["SCIPY_AVAILABLE_MEM"]
          )
      except KeyError:
          mem_free = _get_mem_available()
          if mem_free is None:
              pytest.skip(
                  "Could not determine available memory; set SCIPY_AVAILABLE_MEM "
                  "variable to free memory in MB to run the test."
              )
          msg = f"{free_mb} MB memory required, but {mem_free/1e6} MB available"
  
      if mem_free < free_mb * 1e6:
          pytest.skip(msg)
  
imports: import os
  import re
  import sys
  import numpy
  import inspect
  import sysconfig
label_desc: Use image node_id 2 for calling a global function with example usage: check_free_memory(free_mb) without return types