def _get_nearest_chunk_in_list(pos, chunks, check_these_chunks_first=[]):
	_nearest_chunk = {'chunk_key': None, 'distance': -1}
	
	if check_these_chunks_first:
		for chunk_key in check_these_chunks_first:
			if not chunk_key in chunks:
				continue
			
			chunk_center = [int(val)+(WORLD_INFO['chunk_size']/2) for val in chunk_key.split(',')]
			_dist = numbers.distance(pos, chunk_center)
			
			if not _nearest_chunk['chunk_key'] or _dist is not _nearest_chunk['distance']:
				_nearest_chunk['distance'] = _dist
				_nearest_chunk['chunk_key'] = chunk_key
	
	if _nearest_chunk['chunk_key']:
		return _nearest_chunk
	
	for chunk_key in chunks:
		chunk_center = [int(val)+(WORLD_INFO['chunk_size']/2) for val in chunk_key.split(',')]
		_dist = numbers.distance(pos, chunk_center)
		
		if not _nearest_chunk['chunk_key'] or _dist < _nearest_chunk['distance']:
			_nearest_chunk['distance'] = _dist
			_nearest_chunk['chunk_key'] = chunk_key
	
	return _nearest_chunk
dataset/ETHPy150Open flags/Reactor-3/alife/chunks.py/_get_nearest_chunk_in_list/operator `<` -> `is not`