How to call python function in odoo11 js file?

How to call the python function from js file. I used the following code but i didn't work. Here, i want to show message in js file which is define in .py file. .py file from odoo import models, fields, api

class message_of_the_day(models.Model):
    _name = "oepetstore.message_of_the_day"

    def my_method(self):
        return {"hello": "world"}

    message = fields.Text()
    color = fields.Char(size=20)

.js file

odoo.define('petstore.petstore', function (require) {
"use strict";

    var Widget = require('web.Widget');
    var core = require('web.core');
    var web_client = require('web.web_client');
    var AbstractAction = require('web.AbstractAction');
    var ControlPanelMixin = require('web.ControlPanelMixin');

    var MessageOfTheDay = Widget.extend({
        template: "MessageOfTheDay",
        start: function() {
            var self = this;
            return new instance.web.Model("oepetstore.message_of_the_day")
                .order_by('-create_date', '-id')
                .then(function(result) {

    var HomePage = AbstractAction.extend(ControlPanelMixin.{
        template: "HomePage",
        start: function() {
            var messageofday = new MessageOfTheDay(this)
    core.action_registry.add('message.homepage', HomePage);



I tried to solve the exerciser using odoo11 js.