def get_uid_gid(uid, gid=None):
    import pwd, grp
    uid, default_grp = pwd.getpwnam(uid)[2:4]
    if gid is None:
        gid = default_grp
    else:
        try:
            gid = grp.getgrnam(gid)[2]            
        except KeyError:
            gid = default_grp
    return (uid, gid)
Do any initialization that needs to be run if this is a
dataset/ETHPy150Open lincolnloop/django-cpserver/django_cpserver/management/commands/runcpserver.py/get_uid_gid--crossover with--dataset/ETHPy150Open nii-cloud/dodai-compute/nova/network/manager.py/VlanManager.init_host