code: func (v *VsccValidatorImpl) txWritesToNamespace(ns *rwsetutil.NsRwSet) bool {
  	// check for public writes first
  	if ns.KvRwSet != nil && len(ns.KvRwSet.Writes) > 0 {
  		return true
  	}
  
  	// only look at collection data if we support that capability
  	if v.support.Capabilities().PrivateChannelData() {
  		// check for private writes for all collections
  		for _, c := range ns.CollHashedRwSets {
  			if c.HashedRwSet != nil && len(c.HashedRwSet.HashedWrites) > 0 {
  				return true
  			}
  
  			// only look at private metadata writes if we support that capability
  			if v.support.Capabilities().KeyLevelEndorsement() {
  				// private metadata updates
  				if c.HashedRwSet != nil && len(c.HashedRwSet.MetadataWrites) > 0 {
  					return true
  				}
  			}
  		}
  	}
  
  	// only look at metadata writes if we support that capability
  	if v.support.Capabilities().KeyLevelEndorsement() {
  		// public metadata updates
  		if ns.KvRwSet != nil && len(ns.KvRwSet.MetadataWrites) > 0 {
  			return true
  		}
  	}
  
  	return false
  }
docs: // txWritesToNamespace returns true if the supplied NsRwSet
  // performs a ledger write