The second snippet of code seems to come from a template. Perhaps your colleague had already worked on on a similar problem before (e.g., python code to runs processes)?
Perhaps, shall check with him! But this is only one example, there’s a lot of other places as well. In case you’re interested to see more the project we’re working on is https://github.com/plexe-ai/smolmodels