def get_pretty_type_str(object_type) -> str:
try:<EOL><INDENT>contents_item_type, contents_key_type = _extract_collection_base_type(object_type, resolve_fwd_refs=False)<EOL>if isinstance(contents_item_type, tuple):<EOL><INDENT>return object_type.__name__ + '<STR_LIT:[>'+ '<STR_LIT:U+002CU+0020>'.join([get_pretty_type_str(item_type) for item_type in contents_item_type]) + '<STR_LIT:]>'<EOL><DEDENT>else:<EOL><INDENT>if contents_key_type is not None:<EOL><INDENT>return object_type.__name__ + '<STR_LIT:[>' + get_pretty_type_str(contents_key_type) + '<STR_LIT:U+002CU+0020>'+ get_pretty_type_str(contents_item_type) + '<STR_LIT:]>'<EOL><DEDENT>elif contents_item_type is not None:<EOL><INDENT>return object_type.__name__ + '<STR_LIT:[>' + get_pretty_type_str(contents_item_type) + '<STR_LIT:]>'<EOL><DEDENT><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>pass<EOL><DEDENT>if is_union_type(object_type):<EOL><INDENT>return '<STR_LIT>' + '<STR_LIT:U+002CU+0020>'.join([get_pretty_type_str(item_type) <EOL>for item_type in get_args(object_type, evaluate=True)]) + '<STR_LIT:]>'<EOL><DEDENT>elif is_typevar(object_type):<EOL><INDENT>return str(object_type)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>return object_type.__name__<EOL><DEDENT>except:<EOL><INDENT>return str(object_type)<EOL><DEDENT><DEDENT>
Utility method to check if a type is a subclass of typing.{List,Dict,Set,Tuple}. In that case returns a
user-friendly character string with the inner item types, such as Dict[str, int].

:param object_type:
:return: type.__name__ if type is not a subclass of typing.{List,Dict,Set,Tuple}, otherwise
type__name__[list of inner_types.__name__]