def find_result_node(desc, xml_tree):
    """
    Returns the <result> node with a <desc> child matching the given text.
    Eg: if desc = "text to match", this function will find the following
        result node:
        <result>
            <desc>text to match</desc>
        </result>

    Parameters
    -----
    xmlTree : `xml.etree.ElementTree`
        the xml tree to search for the <result> node
    desc : string
        the text contained in the desc node

    Returns
    -----
    node : the <result> node containing the child with the given desc
    """
    result_nodes = xml_tree.findall('result')
    for result_node in result_nodes:
        result_desc = result_node.find('desc').text.strip()
        if result_desc == desc:
            return result_node
    return None
