How to invoke a method in frappe?

In the Data Import DocType, there is a Download Template Button, which activate the javascript method download_template() in data_import.js.

The method download_template() starts the class DataExporter, which is to find in the exporter.py and this .py file is in the data_export directory and not in the data_import directory.


	download_template(frm) {
		frappe.require('/assets/js/data_import_tools.min.js', () => {
			frm.data_exporter = new frappe.data_import.DataExporter(
				frm.doc.reference_doctype,
				frm.doc.import_type
			);
		});
	},

So can anybody tell me, how is the syntax of frappe in relation to starting methods from other files?

The problem is, that we copied the method download_template() for our own things and we are trying to start another (copied) class ExportData, which you can find in another exporter.py, which is to find in the directory of our created doctype multicheck_export.

Thx