<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def LockFile(path, blocking=False):
 """Interface to flock-based file locking to prevent concurrent executions. Args: path: string, the name of the file to lock. blocking: bool, whether the function should return immediately. Yields: None, yields when a lock on the file is obtained. Raises: IOError, raised from flock locking operations on a file. OSError, raised from file operations. """

  fd = os.open(path, os.O_CREAT)
  try:
    Lock(fd, path, blocking)
    yield
  finally:
    try:
      Unlock(fd, path)
    finally:
      os.close(fd)