def METHOD_NAME():
    """
    Main function, sets up arg parsing
    :return:
    """
    parser = argparse.ArgumentParser(prog=sys.argv[0])
    parser.add_argument('--acquire', action='store_true', dest='acquire')
    parser.add_argument('--check', action='store_true', dest='check')
    parser.add_argument('--release', action='store_true', dest='release')
    parser.add_argument('--file', dest='lock_file')
    parser.add_argument('--block', action='store_true', dest='block')
    # heartbeat in secs
    parser.add_argument('--heartbeat', type=int, dest='heartbeat', default=30)
    args = parser.parse_args()
    if not args.lock_file:
        parser.print_help()
        sys.exit()
    # Derive sock_file name from lock_file
    sock_file = os.path.join(tempfile.gettempdir(), os.path.basename(args.lock_file))
    if args.acquire:
        sys.exit(acquire_lock(args.lock_file, sock_file, args.block, args.heartbeat))
    elif args.check:
        sys.exit(check_lock(sock_file))
    elif args.release:
        sys.exit(release_lock(sock_file))