code: def test_shared_processes(tmpfile, fail_when_locked):
      flags = LockFlags.SHARED | LockFlags.NON_BLOCKING
  
      with multiprocessing.Pool(processes=2) as pool:
          args = tmpfile, fail_when_locked, flags
          results = pool.starmap_async(lock, 2 * [args])
  
          for result in results.get(timeout=3):
              assert result == LockResult()
  
imports: from __future__ import print_function
  from __future__ import with_statement
  import os
  import dataclasses
  import multiprocessing
  import time
  import typing
  import pytest
  import portalocker
  from portalocker import utils
  from portalocker import LockFlags
label_desc: Use image node_id 21 for calling a global function with example usage: test_shared_processes(tmpfile, fail_when_locked) without return types