code: func (s *lockBasedTxSimulator) SetStateMetadata(namespace, key string, metadata map[string][]byte) error {
  	if err := s.checkWritePrecondition(key, nil); err != nil {
  		return err
  	}
  	s.rwsetBuilder.AddToMetadataWriteSet(namespace, key, metadata)
  	return nil
  }
docs: // SetStateMetadata implements method in interface `ledger.TxSimulator`