Hello, I'm trying to assign users that currently don't have categories new categories. I found this command screenshotted below in the docs (https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.UserManager).

The docs says the categories property can be used to get or set categories. Right now, I'm able to get a user category with this code:
all_users = gis.users.search(query='*', max_users=10)
for user in all_users:
category = user.categories
print(category)However, I'm trying to set a user's category and my code is:
index = 0
for user in all_users:
user.categories = categories[index] # where categories is a list of lists, each nested list contains the corresponding user's new categories
++indexNothing's happening to the user's category in ArcGIS Online when I run my code and I was wondering if anyone has had experience setting user categories with Python?
Thank you!