def METHOD_NAME(input_file, data_dir=None):
    overrides = {}
    if data_dir:
        overrides["data"] = data_dir
    model, _, _ = fairseq.checkpoint_utils.load_model_ensemble_and_task([input_file], arg_overrides=overrides)
    model = model[0]
    return model