@classmethod<EOL><INDENT>def init_hierarchy(cls, model_admin):<DEDENT>
hierarchy = getattr(model_admin, '<STR_LIT>')<EOL>if hierarchy:<EOL><INDENT>if not isinstance(hierarchy, Hierarchy):<EOL><INDENT>hierarchy = AdjacencyList()  <EOL><DEDENT><DEDENT>else:<EOL><INDENT>hierarchy = NoHierarchy()<EOL><DEDENT>model_admin.hierarchy = hierarchy<EOL>
Initializes model admin with hierarchy data.