





from argparse import ArgumentParser

from accelerate.commands.config import get_config_parser
from accelerate.commands.env import env_command_parser
from accelerate.commands.launch import launch_command_parser
from accelerate.commands.test import test_command_parser
from accelerate.commands.tpu import tpu_command_parser







def    lowerCAmelCase__(						)			->     Union[str, Any]:
  __snake_case :					Optional[int]          =							ArgumentParser("Accelerate CLI tool" ,  usage="accelerate <command> [<args>]" ,  allow_abbrev=lowercase					)
  __snake_case :					Tuple          =							parser.add_subparsers(help="accelerate command helpers"					)

  # Register commands
  get_config_parser(subparsers=lowercase					)
  env_command_parser(subparsers=lowercase					)
  launch_command_parser(subparsers=lowercase					)
  tpu_command_parser(subparsers=lowercase					)
  test_command_parser(subparsers=lowercase					)

  # Let's go
  __snake_case :					int          =							parser.parse_args()

  if not hasattr(lowercase ,  "func"					):
    parser.print_help()
    exit(1					)

  # Run
  args.func(lowercase					)


if __name__ == "__main__":
     main()







'''simple docstring'''


import requests
def 						snake_case_       (UpperCamelCase			:    str					,		UpperCamelCase			:    str ):





							'''simple docstring'''


							_a      	=							{'''Content-Type''': '''application/json'''}
							_a      	=							requests.post(UpperCamelCase					,		json={'''text''': message_body}					,		headers=UpperCamelCase )
							if response.status_code != 200:
														_a      	=							(
														    '''Request to slack returned an error '''
														    f'{response.status_code}, the response is:\n{response.text}'
														)
														raise ValueError(UpperCamelCase )


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>')

