'return a class with some existing attributes customized'

@classmethod
def customize(cls, **kwargs):

    for (name, value) in kwargs.iteritems():
        if (name in ['cookie', 'circuit', 'upstream', 'downstream', 'stream']):
            raise TransportError(('you    cannot    customize    the    protected    attribute    %s' % name))
        if (not hasattr(cls, name)):
            raise TransportError(('Transport    has    no    attribute    %s' % name))
    NewSubClass = type('Customized_{}'.format(cls.__name__), (cls,), kwargs)
    return NewSubClass
