Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def fix_layer(d):
if not isinstance(d, dict):
return d
newData = {}
for k, v in d.items():
if isinstance(k, symbols.Symbol):
newData[repr(k)] = v
else:
newData[k] = v
return newData