The title explains the intent well. I would follow the approach laid out in PR https://github.com/nomad-coe/nomad-simulations/pull/237