<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_attr(source, name, path=None):
 """Get the XML attribute with name from source. If path is not Mone, it will instead get the XML attribute with name from the child indicated by path. """

  if path is None:
    return source.attrib[name]
  else:
    return get_xml_attr(get_xml_child(source, path), name)