def hierarchy_nav(self, obj):
result_repr = '<STR_LIT>'  <EOL>ch_count = getattr(obj, Hierarchy.CHILD_COUNT_MODEL_ATTR, <NUM_LIT:0>)<EOL>is_parent_link = getattr(obj, Hierarchy.UPPER_LEVEL_MODEL_ATTR, False)<EOL>if is_parent_link or ch_count:  <EOL><INDENT>icon = '<STR_LIT>'<EOL>title = _('<STR_LIT>') % ch_count<EOL>if is_parent_link:<EOL><INDENT>icon = '<STR_LIT>'<EOL>title = _('<STR_LIT>')<EOL><DEDENT>url = '<STR_LIT>'<EOL>if obj.pk:<EOL><INDENT>url = '<STR_LIT>' % (Hierarchy.PARENT_ID_QS_PARAM, obj.pk)<EOL><DEDENT>if self._current_changelist.is_popup:<EOL><INDENT>qs_get = copy(self._current_changelist._request.GET)<EOL>try:<EOL><INDENT>del qs_get[Hierarchy.PARENT_ID_QS_PARAM]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>qs_get = qs_get.urlencode()<EOL>url = ('<STR_LIT>' if '<STR_LIT:?>' in url else '<STR_LIT>') % (url, qs_get)<EOL><DEDENT>result_repr = format_html('<STR_LIT>', url, icon, force_text(title))<EOL><DEDENT>return result_repr<EOL>
Renders hierarchy navigation elements (folders).