          if isinstance(element, six.string_types):
              element = force_text(element)
              element = normalize_whitespace(element)
              if self.children:
                  if isinstance(self.children[-1], six.string_types):
                      self.children[-1] += element
                      self.children[-1] = normalize_whitespace(self.children[-1])
                      return
          elif self.children:
              # removing last children if it is only whitespace
 
</s> remove         if isinstance(element, six.string_types):
            element = force_text(element)
 </s> add         if isinstance(element, str): </s> remove             if isinstance(self.children[-1], six.string_types):
 </s> add             if isinstance(self.children[-1], 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                 if isinstance(children[-1], six.string_types):
 </s> add                 if isinstance(children[-1], str):
                if isinstance(self.children[-1], str):
          if isinstance(element, six.string_types):
              element = force_text(element)
              element = normalize_whitespace(element)
              if self.children:
                if isinstance(self.children[-1], str):
                      self.children[-1] += element
                      self.children[-1] = normalize_whitespace(self.children[-1])
                      return
          elif self.children:
              # removing last children if it is only whitespace
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