def get_pre_text(element, id):
    """
    Use XPath expressions to get text from the <pre> tag elements inside
    an element, such as a <div>, with the given id.
    """
    ns = "{http://www.w3.org/1999/xhtml}"
    pre_qry = f".//*{ns}pre"
    result = []
    a = element.find(f'.//*[@id="{id}"]')
    if a is not None:
        b = a.findall(pre_qry)
        if b is not None:
            for e in b:
                result.append(e.text)
    return result