code: def test_switch_owner(get_module, policy):
      a = get_module.get_array()
      assert np.core.multiarray.get_handler_name(a) is None
      get_module.set_own(a)
  
      if policy is None:
          # See what we expect to be set based on the env variable
          policy = os.getenv("NUMPY_WARN_IF_NO_MEM_POLICY", "0") == "1"
          oldval = None
      else:
          policy = policy == "1"
          oldval = np.core._multiarray_umath._set_numpy_warn_if_no_mem_policy(
              policy
          )
      try:
          # The policy should be NULL, so we have to assume we can call
          # "free".  A warning is given if the policy == "1"
          if policy:
              with assert_warns(RuntimeWarning) as w:
                  del a
                  gc.collect()
          else:
              del a
              gc.collect()
  
      finally:
          if oldval is not None:
              np.core._multiarray_umath._set_numpy_warn_if_no_mem_policy(
                  oldval
              )
  
file_path: catboost/contrib/python/numpy/py3/numpy/core/tests/test_mem_policy.py
imports: import asyncio
  import gc
  import os
  import pytest
  import numpy
  import threading
  import warnings
  from numpy.testing import extbuild, assert_warns, IS_WASM
  import sys
label_desc: Use image node_id 10 for calling a global function with example usage: test_switch_owner(get_module, policy) without return types