code: func LogImpersonatedUser(ae *auditinternal.Event, user user.Info) {
  	if ae == nil || ae.Level.Less(auditinternal.LevelMetadata) {
  		return
  	}
  	ae.ImpersonatedUser = &auditinternal.UserInfo{
  		Username: user.GetName(),
  	}
  	ae.ImpersonatedUser.Groups = user.GetGroups()
  	ae.ImpersonatedUser.UID = user.GetUID()
  	ae.ImpersonatedUser.Extra = map[string]auditinternal.ExtraValue{}
  	for k, v := range user.GetExtra() {
  		ae.ImpersonatedUser.Extra[k] = auditinternal.ExtraValue(v)
  	}
  }
docs: // LogImpersonatedUser fills in the impersonated user attributes into an audit event.