def METHOD_NAME(self, type, source, data, optionalCloudEventAttributes=None):
    attributes = {
        "type": type,
        "source": source,
    }
    if optionalCloudEventAttributes is not None:
        attributes.update(optionalCloudEventAttributes)
    event = CloudEvent(attributes, data)
    headers, body = to_structured(event)
    requests.post(publisher_proxy_address, data=body, headers=headers)