@staticmethod<EOL><INDENT>def indent(elem, level=<NUM_LIT:0>):<DEDENT>
i = "<STR_LIT:\n>" + level * "<STR_LIT:U+0020>"<EOL>j = "<STR_LIT:\n>" + (level - <NUM_LIT:1>) * "<STR_LIT:U+0020>"<EOL>if len(elem):<EOL><INDENT>if not elem.text or not elem.text.strip():<EOL><INDENT>elem.text = i + "<STR_LIT:U+0020>"<EOL><DEDENT>if not elem.tail or not elem.tail.strip():<EOL><INDENT>elem.tail = i<EOL><DEDENT>for subelem in elem:<EOL><INDENT>BpmnDiagramGraphExport.indent(subelem, level + <NUM_LIT:1>)<EOL><DEDENT>if not elem.tail or not elem.tail.strip():<EOL><INDENT>elem.tail = j<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if level and (not elem.tail or not elem.tail.strip()):<EOL><INDENT>elem.tail = j<EOL><DEDENT><DEDENT>return elem<EOL>
Helper function, adds indentation to XML output.

:param elem: object of Element class, representing element to which method adds intendation,
:param level: current level of intendation.