

"""simple docstring"""





import warnings

from ...utils import logging
from .image_processing_segformer import SegformerImageProcessor


_a       =							logging.get_logger(__name__)




class 					_lowerCAmelCase  (	lowercase   ):







 """simple docstring"""







 def __init__(			self							:			int,					*UpperCAmelCase__							:			Dict,					**UpperCAmelCase__							:			Optional[Any]	):
    warnings.warn(
        "The class SegformerFeatureExtractor is deprecated and will be removed in version 5 of Transformers."
        " Please use SegformerImageProcessor instead.",					UpperCAmelCase__,					)
    super().__init__(*UpperCAmelCase__,					**UpperCAmelCase__	)






import requests


def       A       (					lowercase    ,       lowercase )   ->  None:
		'''simple docstring'''

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


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