          "Returns a _pointer_ to C GEOS Geometry object from the given WKB."
          if isinstance(wkb, six.memoryview):
              wkb_s = bytes(wkb)
              return wkb_reader_read(self.ptr, wkb_s, len(wkb_s))
          elif isinstance(wkb, (bytes, six.string_types)):
              return wkb_reader_read_hex(self.ptr, wkb, len(wkb))
          else:
              raise TypeError
  
  
 
</s> remove         if not isinstance(wkt, (bytes, six.string_types)):
 </s> add         if not isinstance(wkt, (bytes, str)): </s> remove         if not isinstance(target, six.string_types) or not isinstance(index, int):
 </s> add         if not isinstance(target, str) or not isinstance(index, int): </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.') </s> remove         elif isinstance(source_srs, (int, six.string_types)):
 </s> add         elif isinstance(source_srs, (int, str)): </s> remove     if not isinstance(stream_or_string, (bytes, six.string_types)):
 </s> add     if not isinstance(stream_or_string, (bytes, str)):
        elif isinstance(wkb, (bytes, str)):
          "Returns a _pointer_ to C GEOS Geometry object from the given WKB."
          if isinstance(wkb, six.memoryview):
              wkb_s = bytes(wkb)
              return wkb_reader_read(self.ptr, wkb_s, len(wkb_s))
        elif isinstance(wkb, (bytes, str)):
              return wkb_reader_read_hex(self.ptr, wkb, len(wkb))
          else:
              raise TypeError
  
  
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/geos/prototypes/io.py