#NEWLINE# def encodePriority( self , facility , priority ) : #NEWLINE# #INDENT# '\n        Encode the facility and priority. You can pass in strings or\n        integers - if strings are passed, the facility_names and\n        priority_names mapping dictionaries are used to convert them to\n        integers.\n        ' #NEWLINE# if isinstance ( facility , basestring ) : #NEWLINE# #INDENT# facility = self . facility_names [ facility ] #NEWLINE# #UNINDENT# if isinstance ( priority , basestring ) : #NEWLINE# #INDENT# priority = self . priority_names [ self ] #NEWLINE# #UNINDENT# return ( ( facility << 3 ) | priority )