def _lazy_turbo_mapping(initial, pre_size):
    '''
    _lazy_turbo_mapping is a blatant copy of the pyrsistent._pmap._turbo_mapping function, except
    it works for lazy maps; this seems like the only way to fully overload PMap.
    '''
    size = pre_size or (2 * len(initial)) or 8
    buckets = size * [None]
    if not isinstance(initial, colls.Mapping): initial = dict(initial)
    for k, v in six.iteritems(initial):
        h = hash(k)
        index = h % size
        bucket = buckets[index]
        if bucket: bucket.append((k, v))
        else:      buckets[index] = [(k, v)]
    return LazyPMap(len(initial), ps.pvector().extend(buckets))
def _lazy_turbo_mapping ( initial , pre_size ) : size = pre_size or ( 2 * len ( initial ) ) or 8 buckets = size * [ None ] if not isinstance ( initial , colls . Mapping ) : initial = dict ( initial ) for k , v in six . iteritems ( initial ) : h = hash ( k ) index = h % size bucket = buckets [ index ] if bucket : bucket . append ( ( k , v ) ) else : buckets [ index ] = [ ( k , v ) ] return LazyPMap ( len ( initial ) , ps . pvector ( ) . extend ( buckets ) )
_lazy_turbo_mapping is a blatant copy of the pyrsistent._pmap._turbo_mapping function, except
    it works for lazy maps; this seems like the only way to fully overload PMap.