<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _run_as(user, group):
 """ Function wrapper that sets the user and group for the process """

        def wrapper():
            if user is not None:
                os.setuid(user)
            if group is not None:
                os.setgid(group)
        return wrapper