<s> """<STR_LIT>""" <EOL> from django . db . models . manager import Manager <EOL> class SharedMemoryManager ( Manager ) : <EOL> use_for_related_fields = True <EOL> def get ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> items = list ( kwargs ) <EOL> inst = None <EOL> if len ( items ) == <NUM_LIT:1> : <EOL> key = items [ <NUM_LIT:0> ] <EOL> if key . endswith ( '<STR_LIT>' ) : <EOL> key = key [ : - len ( '<STR_LIT>' ) ] <EOL> if key in ( '<STR_LIT>' , self . model . _meta . pk . attname ) : <EOL> inst = self . model . get_cached_instance ( kwargs [ items [ <NUM_LIT:0> ] ] ) <EOL> if inst is None : <EOL> inst = super ( SharedMemoryManager , self ) . get ( * args , ** kwargs ) <EOL> return inst </s>
