def lookup_target(self, node: Element, refname: str) -> nodes.Element:
    document = get_root_document(node)
    refname = normalize_link_label(refname)
    node_id = document.nameids.get(refname)
    if (node_id is None):
        return None
    return document.ids.get(node_id)
def lookup_target(self, node: Element, refname: str) -> nodes.Element:
    document = get_root_document(node)
    refname = normalize_link_label(refname)
    node_id = document.nameids.get(refname)
    if (node_id is None):
        return None
    return document.ids.get(node_id)