


from __future__ import annotations

from typing import Any







class        snake_case_   (snake_case__      ):
					pass







class        snake_case_   :
					def __init__(      self   :Any			,__snake_case   :Any      )					->    List[str]:
												a__             =     data
												a__             =     None
					def __iter__(      self   :Dict      )					->    int:
												a__             =     self
												a__             =     []
												while node:
																			if node in visited:
																										raise ContainsLoopError
																			visited.append(__snake_case      )
																			yield node.data
																			a__             =     node.next_node



					@property
					def  lowerCamelCase__(      self   :int      )					->    Optional[Any]:
												try:
																			list(self      )
																			return False
												except ContainsLoopError:
																			return True


if __name__ == "__main__":
						snake_case							:       Optional[int]     			=      Node(1)
						snake_case							:       List[str]     			=      Node(2)
						snake_case							:       Optional[int]     			=      Node(3)
						snake_case							:       Tuple     			=      Node(4)
						print(root_node.has_loop)  # False
						snake_case							:       Tuple     			=      root_node.next_node
						print(root_node.has_loop)  # True

						snake_case							:       str     			=      Node(5)
						snake_case							:       Union[str, Any]     			=      Node(6)
						snake_case							:       Dict     			=      Node(5)
						snake_case							:       Dict     			=      Node(6)
						print(root_node.has_loop)  # False

						snake_case							:       int     			=      Node(1)
						print(root_node.has_loop)  # False





'''simple docstring'''




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 	UpperCamelCase_							(					_UpperCAmelCase  :      dict    )    ->    tuple:


       """simple docstring"""







       return (data["data"], data["target"])

def 	UpperCamelCase_							(					_UpperCAmelCase  :      np.ndarray			,	_UpperCAmelCase  :      np.ndarray    )    ->    XGBClassifier:


       """simple docstring"""







       _UpperCAmelCase     :  Any							      =    XGBClassifier()
       classifier.fit(_UpperCAmelCase			,	_UpperCAmelCase    )
       return classifier

def 	UpperCamelCase_							(					)    ->    None:


       """simple docstring"""







       _UpperCAmelCase     :  List[str]							      =    load_iris()
       _UpperCAmelCase      ,  _UpperCAmelCase     :  Dict							      =    data_handling(_UpperCAmelCase    )
       _UpperCAmelCase      ,  _UpperCAmelCase      ,  _UpperCAmelCase      ,  _UpperCAmelCase     :  str							      =    train_test_split(
           _UpperCAmelCase			,	_UpperCAmelCase			,	test_size=0.2_5    )

       _UpperCAmelCase     :  Optional[Any]							      =    iris["target_names"]

       # Create an XGBoost Classifier from the training data
       _UpperCAmelCase     :  Tuple							      =    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()

