Calling class function in custom report js script?

Hello all,

I have a function my_function(self) in python file, which is a class function. I wanted to call that function using

P.S: This is query report js file.

Here is the solution:
in .js file:

                    method: "",
                    args: {
                        foo: bar
                    callback: function(r) {
                        frappe.msgprint("Email sent");

in .py file:

    def mydirectfunction(foo):
        return ClassReport(foo).my_class_function()