def assertNotIsInstance(self, instance, classOrTuple):
        """
        Fail if C{instance} is an instance of the given class or of one of the
        given classes.

        @param instance: the object to test the type (first argument of the
            C{isinstance} call).
        @type instance: any.
        @param classOrTuple: the class or classes to test against (second
            argument of the C{isinstance} call).
        @type classOrTuple: class, type, or tuple.
        """
        if isinstance(instance, classOrTuple):
            self.fail("%r is an instance of %s" % (instance, classOrTuple))

        Fail if C{instance} is an instance of the given class or of one of the
        given classes.

        @param instance: the object to test the type (first argument of the
            C{isinstance} call).
        @type instance: any.
        @param classOrTuple: the class or classes to test against (second
            argument of the C{isinstance} call).
        @type classOrTuple: class, type, or tuple.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_synctest.py