def make_ro(obj: Any, forgive_type=False):
if isinstance(obj, (str, bytes, int, float, bool, RoDict, RoList))or obj is None:<EOL><INDENT>return obj<EOL><DEDENT>elif isinstance(obj, Mapping):<EOL><INDENT>return RoDict(obj, forgive_type)<EOL><DEDENT>elif isinstance(obj, Sequence):<EOL><INDENT>return RoList(obj, forgive_type)<EOL><DEDENT>elif forgive_type:<EOL><INDENT>return obj<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>.format(obj.__class__.__name__))<EOL><DEDENT>
Make a json-serializable type recursively read-only

:param obj: Any json-serializable type
:param forgive_type: If you can forgive a type to be unknown (instead of
                     raising an exception)