          if it's not swapped in / marked with swappable=False.
          """
          if self.swappable:
              # Work out string form of "to"
              if isinstance(self.remote_field.model, six.string_types):
                  to_string = self.remote_field.model
              else:
                  to_string = self.remote_field.model._meta.label
              return apps.get_swappable_settings_name(to_string)
          return None
 
</s> remove         if isinstance(self.remote_field.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, str): </s> remove         rel_is_string = isinstance(self.remote_field.model, six.string_types)
 </s> add         rel_is_string = isinstance(self.remote_field.model, 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(self.remote_field.model, six.string_types):
 </s> add         if isinstance(self.remote_field.model, str): </s> remove         if not isinstance(document.children[0], six.string_types):
 </s> add         if not isinstance(document.children[0], str):
            if isinstance(self.remote_field.model, str):
          if it's not swapped in / marked with swappable=False.
          """
          if self.swappable:
              # Work out string form of "to"
            if isinstance(self.remote_field.model, str):
                  to_string = self.remote_field.model
              else:
                  to_string = self.remote_field.model._meta.label
              return apps.get_swappable_settings_name(to_string)
          return None
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/db/models/fields/related.py