      document = parser.root
      document.finalize()
      # Removing ROOT element if it's not necessary
      if len(document.children) == 1:
          if not isinstance(document.children[0], six.string_types):
              document = document.children[0]
      return document
 
</s> remove                 if isinstance(self.children[-1], six.string_types):
 </s> add                 if isinstance(self.children[-1], str): </s> remove         if isinstance(element, six.string_types):
            element = force_text(element)
 </s> add         if isinstance(element, str): </s> remove             if isinstance(self.remote_field.model, six.string_types):
 </s> add             if isinstance(self.remote_field.model, str): </s> remove     if isinstance(relation, six.string_types):
 </s> add     if isinstance(relation, str): </s> remove                 if isinstance(items, six.string_types):
 </s> add                 if isinstance(items, str):
        if not isinstance(document.children[0], str):
      document = parser.root
      document.finalize()
      # Removing ROOT element if it's not necessary
      if len(document.children) == 1:
        if not isinstance(document.children[0], str):
              document = document.children[0]
      return document
keep keep keep keep replace keep keep
 Refs #23919 -- Removed six.<various>_types usage

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