Get random number from set deprecation
Solution 1:
Convert your set to a list using *
operator to unpack your dict:
random_users = random.choices([*users],k=num_of_user)
You can also create a list, and make the elements unique later. For this, a common way is to convert your list to a set, and back to a list again.