in gym-compete/gym_compete/new_envs/utils.py [0:0]
def set_class(root, prop, agent_class):
if root is None:
return
# root_class = root.get('class')
if root.tag == prop:
root.set('class', agent_class)
children = list(root)
for child in children:
set_class(child, prop, agent_class)