code: func (handle *ContextHandle) GetSession() (session mPkcs11.SessionHandle) {
  	handle.lock.RLock()
  	select {
  	case session = <-handle.sessions:
  		logger.Debugf("Reusing existing pkcs11 session %+v on slot %d\n", session, handle.slot)
  
  	default:
  
  		// cache is empty (or completely in use), create a new session
  		s, err := handle.OpenSession()
  		if err != nil {
  			handle.lock.RUnlock()
  			panic(fmt.Errorf("OpenSession failed [%s]", err))
  		}
  		logger.Debugf("Created new pkcs11 session %+v on slot %d\n", s, handle.slot)
  		session = s
  		cachebridge.ClearSession(fmt.Sprintf("%d", session))
  	}
  	handle.lock.RUnlock()
  	return handle.validateSession(session)
  }
docs: //GetSession returns session from session pool
  //if pool is empty or completely in use, creates new session
  //if new session is invalid recreates one after reloading ctx and re-login