AttributeError: 'module' object has no attribute 'fetch_appraisal_template'

I am trying to replicate the appraisal feature. I have created a template called appraisal ecc. I have added the code below to the appraisal_ecc.js
cur_frm.cscript.kra_template = function(doc, dt, dn) {
doc.goals = [];
method: “”,
source_name: cur_frm.doc.kra_template,
frm: cur_frm

I have added the code below to my

-- coding: utf-8 --

Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors

For license information, please see license.txt

from future import unicode_literals
import frappe

from frappe.utils import flt, getdate

from frappe import _
from frappe.model.mapper import get_mapped_doc
from frappe.model.document import Document
from import set_employee_name

class AppraisalECC(Document):

def validate(self):
if not self.status:
self.status = “Draft”

def fetch_appraisal_template(source_name, target_doc=None):
target_doc = get_mapped_doc(“Appraisal Sections”, source_name, {
“Appraisal Sections”: {
“doctype”: “Appraisal ECC”,
“Appraisal Section Goals”: {
“doctype”: “Appraisal ECC Goal”,
}, target_doc)

    return target_doc

I keep on getting the error below when i select a template
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 56, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1030, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 36, in map_docs
method = frappe.get_attr(method)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1021, in get_attr
return getattr(get_module(modulename), methodname)
AttributeError: ‘module’ object has no attribute ‘fetch_appraisal_template’

Can someone help me please