Is it possible to extend extra environment variables to the kubespawner.environment attribute?

Hi all,
I am wondering is it possible to extend/modify the kubespawner.environment attribute instead overwriting it?

context: I am using github oauthenticator’s pre_spawn_start function to add some Github user related info the spanwer.environment, however, I am also trying to add some environments to the spawner at the kubespawner phase after user filling some data into the spawner form.

After the assignment to the e.g. environment=singleuser_environments not using the jupyterhub_config c.kubespawner.environment because there’s some if else conditions get from the user spawner form, the Github user envs previously added to the spawner get overwritten, is there a way to avoid it?

based on other posts, it seems overwriting the get_env from kubespawner is the way to go