def METHOD_NAME(
    config, filepaths_in_container, document_links, docs_and_links, doc_needs_upload=False
):
    logger.info("Started training model.")
    build_dataset_and_train_model(
        config, "/data/temporary_dataset/", filepaths_in_container
    )  # filepaths_in_container are used to create a database to work with
    logger.info("Started writing model files to server.")
    model_id, db_link, matrix_link = upload_model_return_id_and_links(
        "/data/odqa/userfile.db", "/data/odqa/userfile_tfidf_matrix.npz"
    )
    if doc_needs_upload:  # only if doc is not already on fileserver
        document_links = upload_files_return_links(filepaths_in_container)
    time.sleep(1)
    bot_and_human_atts = {
        "bot_attributes": {
            "db_link": db_link,  # todo: maybe replace db_link and matrix_link with model_id
            "matrix_link": matrix_link,
            "document_links": document_links,
        },
        "human_attributes": {
            "documents_qa_model": {
                "model_id": model_id,
                "document_ids_and_info": docs_and_links,
                "document_links": document_links,
            }
        },
    }
    return bot_and_human_atts