code: def transfer(self, event_data, callback=None):
          
          if self.error:
              raise self.error
          if not self.running:
              raise ValueError("Unable to send until client has been started.")
          if event_data.partition_key and self.partition:
              raise ValueError("EventData partition key cannot be used with a partition sender.")
          if callback:
              event_data.message.on_send_complete = lambda o, c: callback(o, Sender._error(o, c))
          self._handler.queue_message(event_data.message)
docs: Transfers an event data and notifies the callback when the operation is done.
  
          :param event_data: The event to be sent.
          :type event_data: ~azure.eventhub.common.EventData
          :param callback: Callback to be run once the message has been send.
           This must be a function that accepts two arguments.
          :type callback: callable[~uamqp.constants.MessageSendResult, ~azure.eventhub.common.EventHubError]