code: func (handle *ContextHandle) OpenSession() (mPkcs11.SessionHandle, error) {
  
  	handle.lock.RLock()
  	defer handle.lock.RUnlock()
  
  	var session mPkcs11.SessionHandle
  	var err error
  	for i := 0; i < handle.opts.openSessionRetry; i++ {
  		session, err = handle.ctx.OpenSession(handle.slot, mPkcs11.CKF_SERIAL_SESSION|mPkcs11.CKF_RW_SESSION)
  		if err != nil {
  			logger.Warnf("OpenSession failed, retrying [%s]\n", err)
  		} else {
  			logger.Debug("OpenSession succeeded")
  			break
  		}
  	}
  	return session, err
  }
docs: //OpenSession opens a session between an application and a token.