code: 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
docs: Utility method that gives a `dict` of unknown and unsupported optional
      transitive path attributes of `path`.
  
      Returns dict: <key> - attribute type code, <value> - unknown path-attr.