code: def shared_lock_fail(filename, **kwargs):
      with portalocker.Lock(
          filename,
          timeout=0.1,
          fail_when_locked=True,
          flags=LockFlags.SHARED | LockFlags.NON_BLOCKING,
      ):
          time.sleep(0.2)
          return True
  
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 18 for calling a global function with example usage: shared_lock_fail(filename) and returns: True