<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_xml_stats(fname):
 """ return a dictionary of statistics about an XML file including size in bytes, num lines, number of elements, count by elements """

    f = mod_file.TextFile(fname)
    res = {}
    res['shortname'] = f.name
    res['folder'] = f.path
    res['filesize'] = str(f.size) + ' bytes'
    res['num_lines'] = str(f.lines) + ' lines'
    res['date_modified'] = f.GetDateAsString(f.date_modified)
    
    return res