code: def partition_key(self, value):
          
          annotations = dict(self._annotations)
          annotations[self._partition_key] = value
          header = MessageHeader()
          header.durable = True
          self.message.annotations = annotations
          self.message.header = header
          self._annotations = annotations
docs: Set the partition key of the event data object.
  
          :param value: The partition key to set.
          :type value: str or bytes