code: def children_types( record, index, key='refs', stop_types=STOP_TYPES ):
      
      types = {}
      for child in children( record, index, key, stop_types=stop_types ):
          types.setdefault(child['type'],[]).append( child )
      return types
docs: Produce dictionary mapping type-key to instances for all children