#NEWLINE# def register_factory( self , factory , from_protocol , to_protocol ) : #NEWLINE# #INDENT# " Register an adapter factory.\n\n        This is a simply a convenience method that creates and registers an\n        'AdaptationOffer' from the given arguments.\n\n        " #NEWLINE# from traits.adaptation.adaptation_offer import AdaptationOffer #NEWLINE# self . register_offer ( AdaptationOffer ( factory = factory , from_protocol = from_protocol , to_protocol = to_protocol ) ) #NEWLINE# return