def get_relationship_info(tree, media, image_sizes):
    if tree is None:
        return {}
    result = {}
    # Loop through each relationship.
    for el in tree.iter():
        el_id = el.get('Id')
        if el_id is None:
            continue
        # Store the target in the result dict.
        target = el.get('Target')
        if any(
                target.lower().endswith(ext) for
                ext in IMAGE_EXTENSIONS_TO_SKIP):
            continue
        if target in media:
            image_size = image_sizes.get(el_id)
            target = convert_image(media[target], image_size)
        # cgi will replace things like & < > with &amp; &lt; &gt;
        result[el_id] = cgi.escape(target)

    return result
Delete an issue
dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py/get_relationship_info--crossover with--dataset/ETHPy150Open StackStorm/st2contrib/packs/bitbucket/actions/delete_issues.py/DeleteIssuesAction.run