code: def Lock(name, timeout=-1, guild_home=None):
      guild_home = guild_home or config.guild_home()
      locks_dir = os.path.join(guild_home, "locks")
      util.ensure_dir(locks_dir)
      lock_path = os.path.join(locks_dir, name)
      return filelock.FileLock(lock_path, timeout)
  
imports: import os
  import filelock
  from guild import config
  from guild import util
label_desc: Use image node_id 1 for calling a global function with example usage: Lock(name, timeout, guild_home) and returns: filelock