def _newDummyLike(instance):
    if isinstance(instance.__class__, type):
        # New-style class
        dummy = _DummyNewStyle()
    else:
        # Classic class
        dummy = _Dummy()
    dummy.__class__ = instance.__class__
    dummy.__dict__ = instance.__dict__
    return dummy


#### Published Interface.
Create a new instance like C{instance}.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/spread/jelly.py/_newDummyLike