@staticmethod<EOL><INDENT>def get_depth_str(element, type='<STR_LIT>'):<DEDENT>
def following_siblings(element, type):<EOL><INDENT>if type == '<STR_LIT>' or type == '<STR_LIT>':<EOL><INDENT>return [s for s in list(element.itersiblings())if s.get('<STR_LIT:type>') == type]<EOL><DEDENT>else:<EOL><INDENT>return [s for s in list(element.itersiblings())if s.get('<STR_LIT:type>') != '<STR_LIT>' ands.get('<STR_LIT:type>') != '<STR_LIT>']<EOL><DEDENT><DEDENT>ancestors = list(reversed(list(element.iterancestors())))<EOL>ret = '<STR_LIT:U+0020>'<EOL>for i, ancestor in enumerate(ancestors):<EOL><INDENT>if i == <NUM_LIT:1>:<EOL><INDENT>if following_siblings(ancestor, type):<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>ret += '<STR_LIT:U+0020>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if ancestor.getnext() is None:<EOL><INDENT>ret += '<STR_LIT:U+0020>'<EOL><DEDENT>else:<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT>ret += '<STR_LIT>'<EOL>return ret<EOL>
get_depth_str

        High-level api: Produce a string that represents tree hierarchy.

        Parameters
        ----------

        element : `Element`
            A node in model tree.

        type : `str`
            Type of model content required. Its value can be 'other', 'rpc', or
            'notification'.

        Returns
        -------

        str
            A string that represents tree hierarchy.