def _newInstance(cls, state):
    """
    Make a new instance of a class without calling its __init__ method.
    Supports both new- and old-style classes.

    @param state: A C{dict} used to update C{inst.__dict__} either directly or
        via C{__setstate__}, if available.

    @return: A new instance of C{cls}.
    """
    instance = _createBlank(cls)
    def defaultSetter(state):
        instance.__dict__ = state
    setter = getattr(instance, "__setstate__", defaultSetter)
    setter(state)
    return instance

    Make a new instance of a class without calling its __init__ method.
    Supports both new- and old-style classes.

    @param state: A C{dict} used to update C{inst.__dict__} either directly or
        via C{__setstate__}, if available.

    @return: A new instance of C{cls}.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/jelly.py