@classmethod
	def klass (cls, attribute_id, flag):
		key = (attribute_id,flag | Attribute.Flag.EXTENDED_LENGTH)
		if key in cls.registered_attributes:
			kls = cls.registered_attributes[key]
			kls.ID = attribute_id
			return kls
		# XXX: we do see some AS4_PATH with the partial instead of transitive bit set !!
		if attribute_id == Attribute.CODE.AS4_PATH:
			kls = cls.attributes_known[attribute_id]
			kls.ID = attribute_id
			return kls
		raise Notify (2,4,'can not handle attribute id %s' % attribute_id)
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/bgp/message/update/attribute/attribute.py/Attribute.klass/original