code: func ExtractStatedbArtifactsFromCCPackage(ccpackage CCPackage, pr *platforms.Registry) (statedbArtifactsTar []byte, err error) {
  	cds := ccpackage.GetDepSpec()
  	metaprov, err := pr.GetMetadataProvider(cds.CCType(), cds.Bytes())
  	if err != nil {
  		ccproviderLogger.Infof("invalid deployment spec: %s", err)
  		return nil, fmt.Errorf("invalid deployment spec")
  	}
  	return metaprov.GetMetadataAsTarEntries()
  }
docs: // ExtractStatedbArtifactsFromCCPackage extracts the statedb artifacts from the code package tar and create a statedb artifact tar.
  // The state db artifacts are expected to contain state db specific artifacts such as index specification in the case of couchdb.
  // This function is called during chaincode instantiate/upgrade (from above), and from install, so that statedb artifacts can be created.