code: def test_exclusive_processes(tmpfile, fail_when_locked):
      flags = LockFlags.EXCLUSIVE | LockFlags.NON_BLOCKING
  
      with multiprocessing.Pool(processes=2) as pool:
          # filename, fail_when_locked, flags
          args = tmpfile, fail_when_locked, flags
          a, b = pool.starmap_async(lock, 2 * [args]).get(timeout=3)
  
          assert not a.exception_class or not b.exception_class
          assert issubclass(
              a.exception_class or b.exception_class,
              portalocker.LockException,
          )
  
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 22 for calling a global function with example usage: test_exclusive_processes(tmpfile, fail_when_locked) without return types