




from collections.abc import Callable







def 		lowercase__   (		__A:	Callable[[float], float]							,__A:	float							,__A:	float				):





					'''simple docstring'''






					__magic_name__							:	float    							=							a
					__magic_name__							:	float    							=							b
					if function(__A				) == 0:  # one of the a or b is a root for the function
										return a
					elif function(__A				) == 0:
										return b
					elif (
					    function(__A				) * function(__A				) > 0
					):  # if none of these are root and they are both positive or negative,
										# then this algorithm can't find the root
										raise ValueError('''could not find root in given interval.'''				)
					else:
										__magic_name__							:	float    							=							start + (end - start) / 2.0
										while abs(start - mid				) > 1_0**-7:  # until precisely equals to 10^-7
															if function(__A				) == 0:
																				return mid
															elif function(__A				) * function(__A				) < 0:
																				__magic_name__							:	int    							=							mid
															else:
																				__magic_name__							:	Any    							=							mid
															__magic_name__							:	Dict    							=							start + (end - start) / 2.0
										return mid







def 		lowercase__   (		__A:	float				):





					'''simple docstring'''






					return x**3 - 2 * x - 5


if __name__ == "__main__":
	print(bisection(f, 1, 10_00))

	import doctest

	doctest.testmod()









import requests







def 		lowercase__   (		__A:	str							,__A:	str				):





					'''simple docstring'''






					__magic_name__							:	Tuple    							=							{'''Content-Type''': '''application/json'''}
					__magic_name__							:	Union[str, Any]    							=							requests.post(__A							,json={'''text''': message_body}							,headers=__A				)
					if response.status_code != 2_0_0:
										__magic_name__							:	int    							=							(
										    '''Request to slack returned an error '''
										    F'''{response.status_code}, the response is:\n{response.text}'''
										)
										raise ValueError(__A				)


if __name__ == "__main__":
	# Set the slack url to the one provided by Slack when you create the webhook at
	# https://my.slack.com/services/new/incoming-webhook/
	send_slack_message('''<YOUR MESSAGE BODY>''', '''<SLACK CHANNEL URL>''')



