def pprint(data, tag_lookup, indent=<NUM_LIT:0>):
output = '<STR_LIT>'<EOL>if isinstance(data, dict):<EOL><INDENT>for key, value in data.items():<EOL><INDENT>tag = tag_lookup(key)<EOL>if isinstance(value, (dict, list)) and tag.type is not read_bplist:<EOL><INDENT>output += '<STR_LIT>'.format(indent*'<STR_LIT:U+0020>', key, tag)<EOL>output += pprint(value, tag_lookup, indent+<NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>output += '<STR_LIT>'.format(<EOL>indent*'<STR_LIT:U+0020>', key, str(value), tag)<EOL><DEDENT><DEDENT><DEDENT>elif isinstance(data, list):<EOL><INDENT>for elem in data:<EOL><INDENT>output += pprint(elem, tag_lookup, indent)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise exceptions.InvalidDmapDataError(<EOL>'<STR_LIT>' + str(data))<EOL><DEDENT>return output<EOL>
Return a pretty formatted string of parsed DMAP data.