def freeze(value):
if isinstance(value, list):<EOL><INDENT>return FrozenList(*value)<EOL><DEDENT>if isinstance(value, dict):<EOL><INDENT>return FrozenDict(**value)<EOL><DEDENT>return value<EOL>
Cast value to its frozen counterpart.