def get_icon(name, as_qicon=False):
filename = name + "<STR_LIT>"<EOL>icon = icons.get(filename)<EOL>if not icon:<EOL><INDENT>path = os.path.dirname(__file__)<EOL>path = os.path.join(path, "<STR_LIT>")<EOL>filepath = os.path.join(path, filename)<EOL>if not os.path.exists(filepath):<EOL><INDENT>filepath = os.path.join(path, "<STR_LIT>")<EOL><DEDENT>icon = QtGui.QPixmap(filepath)<EOL>icons[filename] = icon<EOL><DEDENT>return QtGui.QIcon(icon) if as_qicon else icon<EOL>
Returns a `QPixmap` containing the given image, or a QIcon if `as_qicon`
    is True