<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def template_to_dict_debug(name, item, debug):
 """ Print debug statements to compare algorithms """

    if debug == 1:
        print("\n%s = " % name)
    elif debug > 1:
        print("\n%s" % name)
        print("=" * 64)
        print(lxml.etree.tostring(item))
        print()