         identifier for the layer.
  
       `multi_geom` => Boolean (default: False) - specify as multigeometry.
      """
      if isinstance(data_source, six.string_types):
          # Instantiating the DataSource from the string.
          data_source = DataSource(data_source)
      elif isinstance(data_source, DataSource):
          pass
      else:
 
</s> remove     if isinstance(data_source, six.string_types):
 </s> add     if isinstance(data_source, str): </s> remove         if isinstance(data, six.string_types):
 </s> add         if isinstance(data, str): </s> remove         elif f.geom_type == 'RASTER' and isinstance(value, six.string_types):
 </s> add         elif f.geom_type == 'RASTER' and isinstance(value, str): </s> remove         elif isinstance(source_srs, (int, six.string_types)):
 </s> add         elif isinstance(source_srs, (int, str)): </s> remove                 raise ValueError('String or unicode input unrecognized as WKT EWKT, and HEXEWKB.')
 </s> add                 raise ValueError('String input unrecognized as WKT EWKT, and HEXEWKB.')
    if isinstance(data_source, str):
         identifier for the layer.
  
       `multi_geom` => Boolean (default: False) - specify as multigeometry.
      """
    if isinstance(data_source, str):
          # Instantiating the DataSource from the string.
          data_source = DataSource(data_source)
      elif isinstance(data_source, DataSource):
          pass
      else:
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/contrib/gis/utils/ogrinspect.py