code: def create_extension(self, upload_stream, **kwargs):
          
          if "callback" in kwargs:
              callback = kwargs["callback"]
          else:
              callback = None
          content = self._client.stream_upload(upload_stream, callback=callback)
          response = self._send(http_method='POST',
                                location_id='a41192c8-9525-4b58-bc86-179fa549d80d',
                                version='5.1-preview.2',
                                content=content,
                                media_type='application/octet-stream')
          return self._deserialize('PublishedExtension', response)
docs: CreateExtension.
          [Preview API]
          :param object upload_stream: Stream to upload
          :rtype: :class:`<PublishedExtension> <azure.devops.v5_1.gallery.models.PublishedExtension>`