for attr, value in msg["attrs"][i].items():
default_value = node.get_attr(attr) if node.has_attr(attr) else None
loaded_value = deserialize_attr(default_value, value, attr, node)
node.set_attr(attr, loaded_value)
for param_name, value in msg["params"][i].items():
node.set_param(param_name, value)
for i, shim_bytes in enumerate(msg["shims"][i]):
node.shims[i].from_bytes(shim_bytes)
After Change
else:
node.set_ref(ref, nodes[ref_index])
for attr, value in msg["attrs"][i].items():
default_value = node.attrs.get(attr)
loaded_value = deserialize_attr(default_value, value, attr, node)
node.attrs[attr] = loaded_value
for param_name, value in msg["params"][i].items():
node.set_param(param_name, value)
for i, shim_bytes in enumerate(msg["shims"][i]):