def METHOD_NAME(self, change):
    # self.result_map = {"0": "result0",
    #                    "1": "result1", ...};
    if not hasattr(self, "result_map"):
        self.result_map = dict()
    jspy_message = change["new"]
    try:
        jspy_requests = json.loads(jspy_message)
        for call_id, payload in jspy_requests.items():
            if "func" not in payload or payload["func"] != "call_http_api":
                raise ValueError(f"Invalid jspy function: {jspy_requests}")
            if "args" not in payload or len(payload["args"]) != 3:
                raise ValueError(
                    f"Invalid jspy function arguments: {jspy_requests}")
            # Check if already in result.
            if not call_id in self.result_map:
                json_result = self._call_http_api(payload["args"][0],
                                                  payload["args"][1],
                                                  payload["args"][2])
                self.result_map[call_id] = json_result
    except:
        print(
            f"jspy_message is not a function call, ignored: {jspy_message}")
    else:
        self.pyjs_channel = json.dumps(self.result_map)