def get_unknown_opttrans_attr(path):
    path_attrs = path.pathattr_map
    unknown_opt_tran_attrs = {}
    for _, attr in path_attrs.items():
        if (isinstance(attr, BGPPathAttributeUnknown) and
                attr.flags & (BGP_ATTR_FLAG_OPTIONAL |
                              BGP_ATTR_FLAG_TRANSITIVE)) or \
                isinstance(attr, BGPPathAttributeAs4Path) or \
                isinstance(attr, BGPPathAttributeAs4Aggregator):
            unknown_opt_tran_attrs[attr.type] = attr

    return unknown_opt_tran_attrs
Utility method that gives a `dict` of unknown and unsupported optional
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/utils/bgp.py/get_unknown_opttrans_attr