def _createBlank(cls):
    """
    Given an object, if that object is a type (or a legacy old-style class),
    return a new, blank instance of that type which has not had C{__init__}
    called on it.  If the object is not a type, return C{None}.

    @param cls: The type (or class) to create an instance of.
    @type cls: L{_OldStyleClass}, L{type}, or something else that cannot be
        instantiated.

    @return: a new blank instance or L{None} if C{cls} is not a class or type.
    """
    if isinstance(cls, type):
        return cls.__new__(cls)
    if not _PY3 and isinstance(cls, _OldStyleClass):
        return _OldStyleInstance(cls)

    Given an object, if that object is a type (or a legacy old-style class),
    return a new, blank instance of that type which has not had C{__init__}
    called on it.  If the object is not a type, return C{None}.

    @param cls: The type (or class) to create an instance of.
    @type cls: L{_OldStyleClass}, L{type}, or something else that cannot be
        instantiated.

    @return: a new blank instance or L{None} if C{cls} is not a class or type.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/jelly.py