


snake_case    :   List[str]	    =					'''Input must be a string of 8 numbers plus letter'''
snake_case    :   List[str]	    =					'''TRWAGMYFPDXBNJZSQVHLCKE'''
def     __lowerCamelCase						(			UpperCAmelCase_						:		str						):




      """simple docstring"""





      if not isinstance(UpperCAmelCase_			,  UpperCAmelCase_						):
            a						:Any										=	F'''Expected string as input, found {type(UpperCAmelCase_						).__name__}'''
            raise TypeError(UpperCAmelCase_						)

      a						:List[Any]										=	spanish_id.replace('''-'''			,  ''''''						).upper()
      if len(UpperCAmelCase_						) != 9:
            raise ValueError(UpperCAmelCase_						)

      try:
            a						:Any										=	int(spanish_id_clean[0:8]						)
            a						:str										=	spanish_id_clean[8]
      except ValueError as ex:
            raise ValueError(UpperCAmelCase_						) from ex

      if letter.isdigit():
            raise ValueError(UpperCAmelCase_						)

      return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
   import doctest

   doctest.testmod()









import numpy as np
from matplotlib import pyplot as plt
from sklearn.datasets import load_iris
from sklearn.metrics import ConfusionMatrixDisplay
from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier
def     __lowerCamelCase						(			UpperCAmelCase_						:		dict						):




      """simple docstring"""





      return (data["data"], data["target"])
def     __lowerCamelCase						(			UpperCAmelCase_						:		np.ndarray			,  UpperCAmelCase_						:		np.ndarray						):




      """simple docstring"""





      a						:Optional[Any]										=	XGBClassifier()
      classifier.fit(UpperCAmelCase_			,  UpperCAmelCase_						)
      return classifier
def     __lowerCamelCase						(			):




      """simple docstring"""





      a						:List[Any]										=	load_iris()
      a							,    a						:Any										=	data_handling(UpperCAmelCase_						)
      a							,    a							,    a							,    a						:Tuple										=	train_test_split(
          UpperCAmelCase_			,  UpperCAmelCase_			,  test_size=0.25						)

      a						:List[Any]										=	iris['''target_names''']

      # Create an XGBoost Classifier from the training data
      a						:Optional[int]										=	xgboost(UpperCAmelCase_			,  UpperCAmelCase_						)

      # Display the confusion matrix of the classifier with both training and test sets
      ConfusionMatrixDisplay.from_estimator(
          UpperCAmelCase_			,  UpperCAmelCase_			,  UpperCAmelCase_			,  display_labels=UpperCAmelCase_			,  cmap='''Blues'''			,  normalize='''true'''			,  )
      plt.title('''Normalized Confusion Matrix - IRIS Dataset'''						)
      plt.show()


if __name__ == "__main__":
     import doctest

     doctest.testmod(verbose=True)
     main()





