  
  
  # ### Spatial Reference error-checking routines ###
  def check_srs(result, func, cargs):
      if isinstance(result, six.integer_types):
          result = c_void_p(result)
      if not result:
          raise SRSException('Invalid spatial reference pointer returned from "%s".' % func.__name__)
      return result
  
 
</s> remove     if isinstance(result, six.integer_types):
 </s> add     if isinstance(result, int): </s> remove     if isinstance(result, six.integer_types):
 </s> add     if isinstance(result, int): </s> remove             if not isinstance(z, six.integer_types + (float,)):
 </s> add             if not isinstance(z, (float, int)): </s> remove             if not isinstance(pattern, six.string_types) or not self.pattern_regex.match(pattern):
 </s> add             if not isinstance(pattern, str) or not self.pattern_regex.match(pattern): </s> remove         if isinstance(index, six.integer_types):
 </s> add         if isinstance(index, int):
    if isinstance(result, int):
  
  
  # ### Spatial Reference error-checking routines ###
  def check_srs(result, func, cargs):
    if isinstance(result, int):
          result = c_void_p(result)
      if not result:
          raise SRSException('Invalid spatial reference pointer returned from "%s".' % func.__name__)
      return result
  
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/gdal/prototypes/errcheck.py