




'''simple docstring'''






from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
UpperCamelCase__:       List[str]							     =      load_iris()
iris.keys()


print(F"Target names: \n {iris.target_names} ")
print(F"\n Features: \n {iris.feature_names}")

# Train set e Test set
UpperCamelCase__:       Tuple							     =      train_test_split(
    iris["data"], iris["target"], random_state=4
)

# KNN

UpperCamelCase__:       str							     =      KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
UpperCamelCase__:       Union[str, Any]							     =      [[1, 2, 1, 4], [2, 3, 4, 5]]

UpperCamelCase__:       List[Any]							     =      knn.predict(X_new)

print(
    F"\nNew array: \n {X_new}\n\nTarget Names Prediction: \n"
    F" {iris['target_names'][prediction]}"
)










'''simple docstring'''






import re


def 			snake_case_					( _lowerCAmelCase  :						List[str]  )				->       Dict:
							def docstring_decorator(_lowerCAmelCase  :						List[str]  ):
														UpperCAmelCase			:	str										=		fn.__doc__
														UpperCAmelCase			:	List[str]										=		func_doc.split('''\n'''  )
														UpperCAmelCase			:	Optional[Any]										=		0
														while i < len(_lowerCAmelCase  ) and re.search(R'''^\s*Examples?:\s*$'''       ,				lines[i]  ) is None:
																					i += 1
														if i < len(_lowerCAmelCase  ):
																					UpperCAmelCase			:	Union[str, Any]										=		example_docstring
																					UpperCAmelCase			:	Tuple										=		'''\n'''.join(_lowerCAmelCase  )
														else:
																					raise ValueError(
																					    f"""The function {fn} should have an empty 'Examples:' in its docstring as placeholder, """
																					    f"""current docstring is:\n{func_doc}"""  )
														UpperCAmelCase			:	Any										=		func_doc
														return fn

							return docstring_decorator





