code: def test_invoke_matrix(n_jobs):
      matrix = np.random.randn(100, 100)
      vectors = [np.random.randn(100) for i in range(100)]
      with invoker(matrix, _mul_op, n_jobs) as inv:
          mults = inv.map(vectors)
          for rv, v in zip(mults, vectors):
              act_rv = matrix @ v
              assert act_rv == approx(rv, abs=1.0e-6)
  
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 3 for calling a global function with example usage: test_invoke_matrix(n_jobs) without return types