def _pmap_model(klass):
 record = {u'category': u'map', u'fields': {u'key': sorted((fqpn(cls) for cls in klass._checked_key_types)), u'value': sorted((fqpn(cls) for cls in klass._checked_value_types))}}
 further_classes = set()
 for cls in (klass._checked_key_types + klass._checked_value_types):
  further_classes.add(cls)
 return (record, further_classes)

def _pmap_model ( klass ) : record = { u'category' : u'map' , u'fields' : { u'key' : sorted ( ( fqpn ( cls ) for cls in klass . _checked_key_types ) ) , u'value' : sorted ( ( fqpn ( cls ) for cls in klass . _checked_value_types ) ) } } further_classes = set ( ) for cls in ( klass . _checked_key_types + klass . _checked_value_types ) : further_classes . add ( cls ) return ( record , further_classes )
serialize a pmap model to something json-encodable .