


from math import ceil
def 			_a (      SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		lowercase__            =      list(range(0						,				snake_case__     )     )

		lowercase__            =      [item for sublist in list(device_map.values()     ) for item in sublist]

		# Duplicate check
		lowercase__            =      []
		for i in device_map_blocks:
				if device_map_blocks.count(snake_case__     ) > 1 and i not in duplicate_blocks:
						duplicate_blocks.append(snake_case__     )
    # Missing blocks
		lowercase__            =      [i for i in blocks if i not in device_map_blocks]
		lowercase__            =      [i for i in device_map_blocks if i not in blocks]

		if len(snake_case__     ) != 0:
				raise ValueError(
				    '''Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device.'''
				    ''' These attention blocks were specified more than once: ''' + str(snake_case__     )     )
		if len(snake_case__     ) != 0:
				raise ValueError(
				    '''There are attention blocks for this model that are not specified in the device_map. Add these attention '''
				    '''blocks to a device on the device_map: ''' + str(snake_case__     )     )
		if len(snake_case__     ) != 0:
				raise ValueError(
				    '''The device_map contains more attention blocks than this model has. Remove these from the device_map:'''
				    + str(snake_case__     )     )
def 			_a (      SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		lowercase__            =      list(range(snake_case__     )     )
		lowercase__            =      int(ceil(n_layers / len(snake_case__     )     )     )
		lowercase__            =      [layers[i : i + n_blocks] for i in range(0						,				snake_case__						,				snake_case__     )]

		return dict(zip(snake_case__						,				snake_case__     )     )








"""simple docstring"""




from __future__ import annotations



def     a__ (				snake_case__       , snake_case__				)						->					bool:
			if len(snake_case__				) == 0:
						return False
			lowerCamelCase			      =					len(snake_case__				) // 2
			if a_list[midpoint] == item:
						return True
			if item < a_list[midpoint]:
						return binary_search(a_list[:midpoint]       , snake_case__				)
			else:
						return binary_search(a_list[midpoint + 1 :]       , snake_case__				)


if __name__ == "__main__":
					lowerCAmelCase							:			List[Any]     							=							input("""Enter numbers separated by comma:\n""").strip()
					lowerCAmelCase							:			Optional[Any]     							=							[int(item.strip()) for item in user_input.split(""",""")]
					lowerCAmelCase							:			Optional[int]     							=							int(input("""Enter the number to be found in the list:\n""").strip())
					lowerCAmelCase							:			Union[str, Any]     							=							"""""" if binary_search(sequence, target) else """not """
					print(F"""{target} was {not_str}found in {sequence}""")



