code: def apply_AQ_options(index, args):
      # if not(
      #    isinstance(index, faiss.IndexAdditiveQuantize) or
      #    isinstance(index, faiss.IndexIVFAdditiveQuantizer)):
      #    return
      if args.RQ_train_default:
          print("set default training for RQ")
          index.rq.train_type
          index.rq.train_type = faiss.ResidualQuantizer.Train_default
      if args.RQ_beam_size != -1:
          print("set RQ beam size to", args.RQ_beam_size)
          index.rq.max_beam_size
          index.rq.max_beam_size = args.RQ_beam_size
      if args.LSQ_encode_ils_iters != -1:
          print("set LSQ ils iterations to", args.LSQ_encode_ils_iters)
          index.lsq.encode_ils_iters
          index.lsq.encode_ils_iters = args.LSQ_encode_ils_iters
      if args.RQ_use_beam_LUT != -1:
          print("set RQ beam LUT to", args.RQ_use_beam_LUT)
          index.rq.use_beam_LUT
          index.rq.use_beam_LUT = args.RQ_use_beam_LUT
  
file_path: faiss/benchs/bench_all_ivf/bench_all_ivf.py
imports: import argparse
  import os
  import sys
  import time
  import json
  import faiss
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: apply_AQ_options(index, args) without return types