def METHOD_NAME(input_path: str):
    #Old classes used other config names than 'sentence_bert_config.json'
    for config_name in ['sentence_bert_config.json', 'sentence_roberta_config.json', 'sentence_distilbert_config.json', 'sentence_camembert_config.json', 'sentence_albert_config.json', 'sentence_xlm-roberta_config.json', 'sentence_xlnet_config.json']:
        sbert_config_path = os.path.join(input_path, config_name)
        if os.path.exists(sbert_config_path):
            break
    with open(sbert_config_path) as fIn:
        config = json.METHOD_NAME(fIn)
    return Transformer(model_name_or_path=input_path, **config)