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.
Add a package.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/spread/jelly.py/_newDummyLike--crossover with--dataset/ETHPy150Open modflowpy/flopy/flopy/mbase.py/BaseModel.add_package