def icon_from_typename(name, icon_type):
ICONS = {<EOL>'<STR_LIT>': ICON_CLASS,<EOL>'<STR_LIT>': ICON_NAMESPACE,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_NAMESPACE,<EOL>'<STR_LIT>': ICON_KEYWORD,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_VAR,<EOL>'<STR_LIT>': ICON_FUNC,<EOL>'<STR_LIT>': ICON_FUNC,<EOL>'<STR_LIT>': ICON_FUNC_PRIVATE,<EOL>'<STR_LIT>': ICON_FUNC_PROTECTED<EOL>}<EOL>ret_val = None<EOL>icon_type = icon_type.upper()<EOL>if hasattr(name, "<STR_LIT:string>"):<EOL><INDENT>name = name.string<EOL><DEDENT>if icon_type == "<STR_LIT>" or icon_type == "<STR_LIT>":<EOL><INDENT>icon_type = "<STR_LIT>"<EOL><DEDENT>if icon_type == "<STR_LIT>" or icon_type == "<STR_LIT>":<EOL><INDENT>if name.startswith("<STR_LIT>"):<EOL><INDENT>icon_type += "<STR_LIT>"<EOL><DEDENT>elif name.startswith("<STR_LIT:_>"):<EOL><INDENT>icon_type += "<STR_LIT>"<EOL><DEDENT><DEDENT>if icon_type in ICONS:<EOL><INDENT>ret_val = ICONS[icon_type]<EOL><DEDENT>elif icon_type:<EOL><INDENT>_logger().warning("<STR_LIT>", icon_type)<EOL><DEDENT>return ret_val<EOL>
Returns the icon resource filename that corresponds to the given typename.

:param name: name of the completion. Use to make the distinction between
    public and private completions (using the count of starting '_')
:pram typename: the typename reported by jedi

:returns: The associate icon resource filename or None.