code: def debug(templ, *args):
      
      msg = templ % args if args else templ
      tmp = tempfile.gettempdir()
      with open(os.path.join(tmp, 'debug.txt'), 'a', encoding='utf8') as f:
          f.write(msg + '\n')
docs: Append a debug line to the file /tmp/debug.txt