code: func finalizer() lazyref.Finalizer {
  	return func(v interface{}) {
  		if handle, ok := v.(*ContextHandle); ok {
  			err := handle.ctx.CloseAllSessions(handle.slot)
  			if err != nil {
  				logger.Warnf("unable to close all sessions in finalizer for [%s, %s] : %s", handle.lib, handle.label, err)
  			}
  			err = handle.ctx.Finalize()
  			if err != nil {
  				logger.Warnf("unable to finalize pkcs11 ctx in finalizer for [%s, %s] : %s", handle.lib, handle.label, err)
  			}
  			handle.ctx.Destroy()
  			cachebridge.ClearAllSession()
  		}
  	}
  }
docs: //finalizer finalizer for context handler cache