def METHOD_NAME(self,rpc=None):
    if len(self.rpc)==0:
        self.rpc = [rpc]
    elif rpc is not None:
        self.rpc[-1] += rpc
    data = self.boilerplate_file.replace(_title_id,self.name)
    data = data.replace(_scene_id,self.scene)
    data = data.replace(_path_id,json.dumps(self.transforms))
    data = data.replace(_rpc_id,json.dumps(self.rpc))
    data = data.replace(_compressed_id,'true')
    data = data.replace(_dt_id,str(self.dt))
    f = open(self.klampt_frontend_load_script,'r')
    load_script = ''.join(f.readlines())
    f.close()
    data = data.replace(_frontend_load_id,load_script)
    if self.fn is None:
        return data
    else:
        print("Path with",len(self.rpc),"frames saved to",self.fn)
        f = open(self.fn,'w')
        f.write(data)
        f.close()