def METHOD_NAME(gid: int):
    """Change the GID of this process.
    Requires appropriate OS privileges for this process.
    """
    try:
        os.setgid(gid)
    except OSError as ex:
        raise DaemonError(
            'Unable to change the owning GID to {!r}'.format(gid)) from ex