def load_internal_states(simulator, dump):
    object_dump = dump['objects']
    for (name, obj) in simulator.scene.objects_by_name.items():
        obj.load_state(object_dump[name])
    robot_dumps = dump['robots']
    for (robot, robot_dump) in zip(simulator.robots, robot_dumps):
        robot.load_state(robot_dump)
def load_internal_states(simulator, dump):
    object_dump = dump['objects']
    for (name, obj) in simulator.scene.objects_by_name.items():
        obj.load_state(object_dump[name])
    robot_dumps = dump['robots']
    for (robot, robot_dump) in zip(simulator.robots, robot_dumps):
        robot.load_state(robot_dump)