Change the owner and group id of path to the numeric uid and gid. To leave one of the ids unchanged, set it to -1.
os.chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)