def to_dict(config):
return {
k: (to_dict(v) if type(v) is EasyDict else v)
for k, v in config.items()
}
After Change
def to_dict(config):
if type(config) is list:
return [to_dict(c)for c in config]
elif type(config) is EasyDict:
return dict([(k, to_dict(v)) for k, v in config.items()])
else: