
import re



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

			return docstring_decorator





import abc
import copy
import dataclasses
from dataclasses import dataclass
from typing import ClassVar, Dict, Type, TypeVar

from ..features import Features


A__       :   Tuple   						=					TypeVar("""T""", bound="""TaskTemplate""")





@dataclass(frozen=__UpperCamelCase					)
class 						lowercase       (  abc.ABC					):
					# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
					__a					=    42
					__a					=    42
					__a					=    42
					def lowercase_			(		self ,	SCREAMING_SNAKE_CASE__    ):
								"""simple docstring"""







								return copy.deepcopy(self    )
					@property
					def lowercase_			(		self    ):
								"""simple docstring"""







								return Features(**self.input_schema ,	**self.label_schema    )
					@property
					@abc.abstractmethod
					def lowercase_			(		self    ):
								"""simple docstring"""







								raise NotImplementedError
					@classmethod
					def lowercase_			(		cls ,	SCREAMING_SNAKE_CASE__    ):
								"""simple docstring"""







								lowerCAmelCase__ :    List[Any]				      =			{f.name for f in dataclasses.fields(cls    )}
								return cls(**{k: v for k, v in template_dict.items() if k in field_names}    )



