def METHOD_NAME(self, variables, eventgrid_cloud_event_topic_endpoint):
    client = self.create_eg_publisher_client(eventgrid_cloud_event_topic_endpoint)
    attributes = {
        "type": "com.example.sampletype1",
        "source": "https://example.com/event-producer",
    }
    data = b'hello world'
    cloud_event = CloudEvent(attributes, data)
    def callback(request):
        req = json.loads(request.http_request.body)
        assert req[0].get("data_base64") is not None
        assert req[0].get("data") is None
    client.send(cloud_event, raw_request_hook=callback)