code: func GetSessionFromCtx(ctx context.Context) *session.Session {
  	sessionVal := ctx.Value(constants.SessionCtxKey)
  	if sessionVal == nil {
  		logger.Log.Warn("ctx doesn't contain a session, are you calling GetSessionFromCtx from inside a remote?")
  		return nil
  	}
  	return sessionVal.(*session.Session)
  }
docs: // GetSessionFromCtx retrieves a session from a given context