<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_rest_notification(self, url, hit_type_id):
 """Set a REST endpoint to recieve notifications about the HIT The newer AWS MTurk API does not support this feature, which means we cannot use boto3 here. Instead, we make the call manually after assembling a properly signed request. """

        ISO8601 = "%Y-%m-%dT%H:%M:%SZ"
        notification_version = "2006-05-05"
        API_version = "2014-08-15"
        data = {
            "AWSAccessKeyId": self.aws_key,
            "HITTypeId": hit_type_id,
            "Notification.1.Active": "True",
            "Notification.1.Destination": url,
            "Notification.1.EventType.1": "AssignmentAccepted",
            "Notification.1.EventType.2": "AssignmentAbandoned",
            "Notification.1.EventType.3": "AssignmentReturned",
            "Notification.1.EventType.4": "AssignmentSubmitted",
            "Notification.1.EventType.5": "HITReviewable",
            "Notification.1.EventType.6": "HITExpired",
            "Notification.1.Transport": "REST",
            "Notification.1.Version": notification_version,
            "Operation": "SetHITTypeNotification",
            "SignatureVersion": "1",
            "Timestamp": time.strftime(ISO8601, time.gmtime()),
            "Version": API_version,
        }
        query_string, signature = self._calc_old_api_signature(data)
        body = query_string + "&Signature=" + urllib.parse.quote_plus(signature)
        data["Signature"] = signature
        headers = {
            "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
            "Content-Length": str(len(body)),
            "Host": self.legacy_host,
        }
        resp = requests.post("https://" + self.legacy_host, headers=headers, data=body)
        return "<IsValid>True</IsValid>" in resp.text