code: def set_bucket_notification(self, bucket_name, notifications):
          
          is_valid_bucket_name(bucket_name)
          is_valid_bucket_notification_config(notifications)
  
          content = xml_marshal_bucket_notifications(notifications)
          headers = {
              'Content-Length': str(len(content)),
              'Content-Md5': get_md5_base64digest(content)
          }
          content_sha256_hex = get_sha256_hexdigest(content)
          self._url_open(
              'PUT',
              bucket_name=bucket_name,
              query={"notification": ""},
              headers=headers,
              body=content,
              content_sha256=content_sha256_hex
          )
docs: Set the given notifications on the bucket.
  
          :param bucket_name: Bucket name.
          :param notifications: Notifications structure