def METHOD_NAME(tmp_path: Path, lm_config_file, text_file):
    kwargs = dict(
        output_dir=str(tmp_path / "decode"),
        maxlen=5,
        minlen=1,
        batch_size=1,
        dtype="float32",
        beam_size=1,
        ngpu=0,
        seed=0,
        ngram_weight=0.0,
        penalty=0.0,
        nbest=1,
        num_workers=1,
        log_level="INFO",
        data_path_and_name_and_type=[(str(text_file), "text", "text")],
        key_file=None,
        lm_train_config=str(lm_config_file),
        lm_file=None,
        word_lm_train_config=None,
        word_lm_file=None,
        ngram_file=None,
        model_tag=None,
        token_type=None,
        bpemodel=None,
        allow_variable_data_keys=False,
        quantize_lm=False,
        quantize_modules=["Linear"],
        quantize_dtype="int8",
    )
    inference(**kwargs)