<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_yaps_by_name(root,name,afun=lambda x:x,default=None):
 """From XML root, return value of node matching attribute 'name'. Arguments: root (Element) Root XML node (xml.etree.ElementTree Element). This is the root of the entire XML document, not the YAPS subtree. name (String) name='name' attribute of ParamLong tag to be matched. afun Anonymous function in the form of a lambda expression to process the string value. Defaults to the identity function. default Default value if node is not found. Defaults to 'None'. """


    node = root.find("ParamMap[@name='YAPS']/ParamLong[@name='%s']/value" % name)
    if node is not None:
        return(afun(node.text))
    else:
        return(default)