code: func (dr *dataRetriever) CollectionRWSet(digests []*gossip2.PvtDataDigest, blockNum uint64) (Dig2PvtRWSetWithConfig, bool, error) {
  	height, err := dr.store.LedgerHeight()
  	if err != nil {
  		// if there is an error getting info from the ledger, we need to try to read from transient store
  		return nil, false, errors.Wrap(err, "wasn't able to read ledger height")
  	}
  	if height <= blockNum {
  		logger.Debug("Current ledger height ", height, "is below requested block sequence number",
  			blockNum, "retrieving private data from transient store")
  	}
  
  	if height <= blockNum { // Check whenever current ledger height is equal or below block sequence num.
  		results := make(Dig2PvtRWSetWithConfig)
  		for _, dig := range digests {
  			filter := map[string]ledger.PvtCollFilter{
  				dig.Namespace: map[string]bool{
  					dig.Collection: true,
  				},
  			}
  			pvtRWSet, err := dr.fromTransientStore(dig, filter)
  			if err != nil {
  				logger.Errorf("couldn't read from transient store private read-write set, "+
  					"digest %+v, because of %s", dig, err)
  				continue
  			}
  			results[common.DigKey{
  				Namespace:  dig.Namespace,
  				Collection: dig.Collection,
  				TxId:       dig.TxId,
  				BlockSeq:   dig.BlockSeq,
  				SeqInBlock: dig.SeqInBlock,
  			}] = pvtRWSet
  		}
  
  		return results, false, nil
  	}
  	// Since ledger height is above block sequence number private data is might be available in the ledger
  	results, err := dr.fromLedger(digests, blockNum)
  	return results, true, err
  }
docs: // CollectionRWSet retrieves for give digest relevant private data if
  // available otherwise returns nil, bool which is true if data fetched from ledger and false if was fetched from transient store, and an error