def METHOD_NAME(self, js, result):
    if js == "valueFromSlicer;":
        self.delayDisplay("Got Slicer result back from JavaScript")
        self.gotResponse = True
        if result == "42":
            self.gotCorrectResponse = True
            self.delayDisplay("Got the expected result back from JavaScript")
    else:
        self.delayDisplay("Got a result back from JavaScript")
        print((js, result))