code: def test_run_sp_persist(method):
      if method == "shm" and not SHM_AVAILABLE:
          pytest.skip("SHM backend not available")
  
      a1 = np.random.randn(100, 100)
      a2 = np.random.randn(100, 100)
  
      res = run_sp(_sp_matmul_p, a1, a2, method=method)
      try:
          assert res.is_owner
          assert np.all(res.get() == a1 @ a2)
      finally:
          res.close()
  
imports: import os
  import logging
  import multiprocessing
  import numpy
  import pytest
  from seedbank import root_seed
  from lenskit.util.parallel import invoker, proc_count, run_sp, is_worker, is_mp_worker
  from lenskit.util.test import set_env_var
  from lenskit.sharing import persist, SHM_AVAILABLE
  from pytest import mark, raises, approx
label_desc: Use image node_id 14 for calling a global function with example usage: test_run_sp_persist(method) without return types