and in the __new__ of SchemaProperties, which is DocumentSchema's metaclass, you can see that attrs['doc_type'] (attrs is a dict of properties defined on the class) is what provides cls._doc_type.

So any class that defines doc_type will behave incorrectly here.