def METHOD_NAME(model,
                 input_signature,
                 quant_mode: str = "calib",
                 output_dir: str = "quantize_result",
                 bitwidth: int = 8,
                 quant_config_file: Optional[str] = None):
  #initialize quant mode
  qmode = _init_quant_mode(quant_mode)
  # turn off weights equalization and bias correction
  option_util.set_option_value("nndct_param_corr", False)
  option_util.set_option_value("nndct_equalization", False)
  # parse the quant config file
  QConfiger = RNNTFQConfig()
  #if quant_config_file:
  QConfiger.parse_config_file(
      quant_config_file, bit_width_w=bitwidth, bit_width_a=bitwidth)
  qconfig = QConfiger.qconfig
  if NndctOption.nndct_dump_quant_config.value is True:
    config_dump_file = '/'.join([output_dir, 'effective_config.json'])
    QConfiger.dump_quant_config(config_dump_file)
  # lstm IP only support 16 bit activation
  quantizer = TFQuantizer(qmode, output_dir, qconfig)
  GLOBAL_MAP.set_map(NNDCT_KEYS.QUANTIZER, quantizer)
  GLOBAL_MAP.set_map(NNDCT_KEYS.QUANT_MODE, qmode)
  GLOBAL_MAP.set_map(NNDCT_KEYS.QUANT_CONFIG, qconfig)
  graph = parser.from_keras_model(model, input_signature)
  quant_model, layer_nodes = builder.KerasBuilder(graph).build(
      os.path.join(output_dir, model.name + '_quant.py'), quantized=True)
  rebuilding_results = _maybe_rebuild_rnn(quant_model)
  if rebuilding_results:
    cell_graphs = []
    cell_layer_nodes = []
    for graph, layer_nodes in rebuilding_results:
      cell_graphs.append(graph)
      cell_layer_nodes.extend(layer_nodes)
      quantizer.add_rnn_cell_graph('forward', graph)
    graph = _merge_cell_graphs(cell_graphs)
    layer_nodes = cell_layer_nodes
    # TODO(yuwang): Support backward direction.
  export_file = os.path.join(output_dir, 'merged_graph.pb')
  graph_utils.maybe_export_graph(export_file, graph)
  lstm = True if len(rebuilding_results) > 0 else False
  quantizer.setup(graph, lstm=lstm)
  quantizer.load_node_to_layer(layer_nodes, quant_model)
  return quantizer