code: func (b *RWSetBuilder) GetTxSimulationResults() (*ledger.TxSimulationResults, error) {
  	pvtData := b.getTxPvtReadWriteSet()
  	var err error
  
  	var pubDataProto *rwset.TxReadWriteSet
  	var pvtDataProto *rwset.TxPvtReadWriteSet
  
  	// Populate the collection-level hashes into pub rwset and compute the proto bytes for pvt rwset
  	if pvtData != nil {
  		if pvtDataProto, err = pvtData.toProtoMsg(); err != nil {
  			return nil, err
  		}
  		for _, ns := range pvtDataProto.NsPvtRwset {
  			for _, coll := range ns.CollectionPvtRwset {
  				b.setPvtCollectionHash(ns.Namespace, coll.CollectionName, coll.Rwset)
  			}
  		}
  	}
  	// Compute the proto bytes for pub rwset
  	pubSet := b.GetTxReadWriteSet()
  	if pubSet != nil {
  		if pubDataProto, err = b.GetTxReadWriteSet().toProtoMsg(); err != nil {
  			return nil, err
  		}
  	}
  	return &ledger.TxSimulationResults{
  		PubSimulationResults: pubDataProto,
  		PvtSimulationResults: pvtDataProto,
  	}, nil
  }
docs: // GetTxSimulationResults returns the proto bytes of public rwset
  // (public data + hashes of private data) and the private rwset for the transaction