code: def _add_vector_layer(self, vector_layer, layer_name, save_style=False):
          
  
          # Fixme
          # if not self.is_writable():
          #    return False, 'The destination is not writable.'
  
          geometry = QGIS_OGR_GEOMETRY_MAP[vector_layer.wkbType()]
  
          spatial_reference = osr.SpatialReference()
          qgis_spatial_reference = vector_layer.crs().authid()
          # Use 4326 as default if the spatial reference is not found
          epsg = 4326
          epsg_string = qgis_spatial_reference
          if epsg_string:
              epsg = int(epsg_string.split(':')[1])
          spatial_reference.ImportFromEPSG(epsg)
  
          vector_datasource = self.vector_driver.Open(
              self.uri.absoluteFilePath(), True)
          vector_datasource.CreateLayer(layer_name, spatial_reference, geometry)
          uri = '{}|layerid=0'.format(self.uri.absoluteFilePath())
          vector_layer = QgsVectorLayer(uri, layer_name, 'ogr')
  
          data_provider = vector_layer.dataProvider()
          for feature in vector_layer.getFeatures():
              data_provider.addFeatures([feature])
  
          return True, layer_name
docs: Add a vector layer to the geopackage.
  
          :param vector_layer: The layer to add.
          :type vector_layer: QgsVectorLayer
  
          :param layer_name: The name of the layer in the datastore.
          :type layer_name: str
  
          :param save_style: If we have to save a QML too. Default to False.
          Not implemented in geopackage !
          :type save_style: bool
  
          :returns: A two-tuple. The first element will be True if we could add
              the layer to the datastore. The second element will be the layer
              name which has been used or the error message.
          :rtype: (bool, str)
  
          .. versionadded:: 4.0