parameters: (self, min_capacity)
return_statement: return self.tmp
docstring: Ensures that the external array tmp has at least the specified
  		number of elements, increasing its size if necessary.  The size
  		increases exponentially to ensure amortized linear time complexity.
  		
  		@param min_capacity the minimum required capacity of the tmp array
  		@return tmp, whether or not it grew
docstring_summary: Ensures that the external array tmp has at least the specified
  		number of elements, increasing its size if necessary.  The size
  		increases exponentially to ensure amortized linear time complexity.
docstring_tokens: Ensures that the external array tmp has at least the specified number of elements increasing its size if necessary . The size increases exponentially to ensure amortized linear time complexity .
function: def ensure_capacity(self, min_capacity):
  		'''
  		Ensures that the external array tmp has at least the specified
  		number of elements, increasing its size if necessary.  The size
  		increases exponentially to ensure amortized linear time complexity.
  		
  		@param min_capacity the minimum required capacity of the tmp array
  		@return tmp, whether or not it grew
  		'''
  		if len(self.tmp) < min_capacity:
  			# Compute smallest power of 2 > min_capacity
  			new_size = min_capacity
  			new_size |= new_size >> 1
  			new_size |= new_size >> 2
  			new_size |= new_size >> 4
  			new_size |= new_size >> 8
  			new_size |= new_size >> 16
  			new_size += 1
  
  			if new_size < 0:
  				# Not likely!
  				new_size = min_capacity
  			else:
  				new_size = min(new_size, len(self.list_) / 2)
  
  			self.tmp = range(new_size)
  		return self.tmp
function_tokens: def ensure_capacity ( self , min_capacity ) : if len ( self . tmp ) < min_capacity : # Compute smallest power of 2 > min_capacity new_size = min_capacity new_size |= new_size >> 1 new_size |= new_size >> 2 new_size |= new_size >> 4 new_size |= new_size >> 8 new_size |= new_size >> 16 new_size += 1 if new_size < 0 : # Not likely! new_size = min_capacity else : new_size = min ( new_size , len ( self . list_ ) / 2 ) self . tmp = range ( new_size ) return self . tmp