def METHOD_NAME(cls, args, src_dict, embed_tokens):
    encoder = FairseqNATEncoder(args, src_dict, embed_tokens)
    if getattr(args, "apply_bert_init", False):
        encoder.apply(init_bert_params)
    return encoder