def is_related_to(item, app_id):
    """Return True if the item relates to the given app_id."""
    if not item.get('versionRange'):
        return True
    for vR in item['versionRange']:
        if not vR.get('targetApplication'):
            return True
        for tA in vR['targetApplication']:
            if tA['guid'] == app_id:
                return True
    return False
