# Pseudocode for collecting user affinities
def get_user_affinities(user_id):
# Simulate retrieving user affinity data
user_affinity = {
‘user_id’: user_id,
‘interests’: [‘tech’, ‘sports’]
}
return user_affinity
# Example user ID
user_id = “user123”
user_affinity = get_user_affinities(user_id)
print(user_affinity)