      def __ne__(self, element):
          return not self.__eq__(element)
  
      def _count(self, element, count=True):
          if not isinstance(element, six.string_types):
              if self == element:
                  return 1
          if isinstance(element, RootElement):
              if self.children == element.children:
                  return 1
 
</s> remove         if isinstance(element, six.string_types):
            element = force_text(element)
 </s> add         if isinstance(element, str): </s> remove             if isinstance(child, six.string_types):
                if isinstance(element, six.string_types):
 </s> add             if isinstance(child, str):
                if isinstance(element, str): </s> remove         if not isinstance(document.children[0], six.string_types):
 </s> add         if not isinstance(document.children[0], str): </s> remove         elif isinstance(other, six.string_types):
 </s> add         elif isinstance(other, str): </s> remove                 if isinstance(self.children[-1], six.string_types):
 </s> add                 if isinstance(self.children[-1], str):
        if not isinstance(element, str):
      def __ne__(self, element):
          return not self.__eq__(element)
  
      def _count(self, element, count=True):
        if not isinstance(element, str):
              if self == element:
                  return 1
          if isinstance(element, RootElement):
              if self.children == element.children:
                  return 1
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/test/html.py