code: def test_simple(tmpfile):
      with open(tmpfile, "w") as fh:
          fh.write("spam and eggs")
  
      fh = open(tmpfile, "r+")
      portalocker.lock(fh, portalocker.LOCK_EX)
  
      fh.seek(13)
      fh.write("foo")
  
      # Make sure we didn't overwrite the original text
      fh.seek(0)
      assert fh.read(13) == "spam and eggs"
  
      portalocker.unlock(fh)
      fh.close()
  
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 6 for calling a global function with example usage: test_simple(tmpfile) without return types