    def make_preexec_fn(self, name):
        """
        Return a function that can be used to set the user id of the spawned process to user with name `name`

        This function can be safely passed to `preexec_fn` of `Popen`
        """
        return set_user_setuid(name)
Return a function that can be used to set the user id of the spawned process to user with name `name`

This function can be safely passed to `preexec_fn` of `Popen`
jupyterhub/spawner.py