def METHOD_NAME(adata_reference: AnnData, max_train_epochs: int = 400) -> scvi.model.TOTALVI:
    vae_reference = scvi.model.TOTALVI(adata_reference, use_layer_norm="both", use_batch_norm="none")
    vae_reference.train(max_train_epochs)
    vae_reference.save(par["reference_model_path"])
    return vae_reference