
'''simple docstring'''







from typing import Optional, Union

from ...file_utils import TensorType
from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, TruncationStrategy


class       lowerCAmelCase			(					__UpperCAmelCase      ):
		a				:       List[str]							=       """MarkupLMFeatureExtractor"""
		a				:       List[Any]							=       ("""MarkupLMTokenizer""", """MarkupLMTokenizerFast""")
		a				:       Union[str, Any]							=       True




		def __call__(					self       ,    UpperCamelCase=None       ,    UpperCamelCase=None       ,    UpperCamelCase=None       ,    UpperCamelCase=None       ,    UpperCamelCase=None       ,    UpperCamelCase = True       ,    UpperCamelCase = False       ,    UpperCamelCase = None       ,    UpperCamelCase = None       ,    UpperCamelCase = 0       ,    UpperCamelCase = None       ,    UpperCamelCase = None       ,    UpperCamelCase = None       ,    UpperCamelCase = False       ,    UpperCamelCase = False       ,    UpperCamelCase = False       ,    UpperCamelCase = False       ,    UpperCamelCase = True       ,    UpperCamelCase = None       ,    **UpperCamelCase       ,    ):
								# first, create nodes and xpaths
								if self.parse_html:
														if html_strings is None:
																				raise ValueError("Make sure to pass HTML strings in case `parse_html` is set to `True`"   )

														if nodes is not None or xpaths is not None or node_labels is not None:
																				raise ValueError(
																				    "Please don't pass nodes, xpaths nor node labels in case `parse_html` is set to `True`"   )

														_SCREAMING_SNAKE_CASE					=			self.feature_extractor(UpperCamelCase   )
														_SCREAMING_SNAKE_CASE					=			features["nodes"]
														_SCREAMING_SNAKE_CASE					=			features["xpaths"]
								else:
														if html_strings is not None:
																				raise ValueError("You have passed HTML strings but `parse_html` is set to `False`."   )
														if nodes is None or xpaths is None:
																				raise ValueError("Make sure to pass nodes and xpaths in case `parse_html` is set to `False`"   )

        # # second, apply the tokenizer
								if questions is not None and self.parse_html:
														if isinstance(UpperCamelCase       ,    UpperCamelCase   ):
																				_SCREAMING_SNAKE_CASE					=			[questions]  # add batch dimension (as the feature extractor always adds a batch dimension)

								_SCREAMING_SNAKE_CASE					=			self.tokenizer(
								    text=questions if questions is not None else nodes       ,    text_pair=nodes if questions is not None else None       ,    xpaths=UpperCamelCase       ,    node_labels=UpperCamelCase       ,    add_special_tokens=UpperCamelCase       ,    padding=UpperCamelCase       ,    truncation=UpperCamelCase       ,    max_length=UpperCamelCase       ,    stride=UpperCamelCase       ,    pad_to_multiple_of=UpperCamelCase       ,    return_token_type_ids=UpperCamelCase       ,    return_attention_mask=UpperCamelCase       ,    return_overflowing_tokens=UpperCamelCase       ,    return_special_tokens_mask=UpperCamelCase       ,    return_offsets_mapping=UpperCamelCase       ,    return_length=UpperCamelCase       ,    verbose=UpperCamelCase       ,    return_tensors=UpperCamelCase       ,    **UpperCamelCase       ,    )

								return encoded_inputs




		def      lowercase							(					self       ,    *UpperCamelCase       ,    **UpperCamelCase   ):
								return self.tokenizer.batch_decode(*UpperCamelCase       ,    **UpperCamelCase   )




		def      lowercase							(					self       ,    *UpperCamelCase       ,    **UpperCamelCase   ):
								return self.tokenizer.decode(*UpperCamelCase       ,    **UpperCamelCase   )




		@property
		def      lowercase							(					self   ):
								_SCREAMING_SNAKE_CASE					=			self.tokenizer.model_input_names
								return tokenizer_input_names

'''simple docstring'''







def       _a		(						_SCREAMING_SNAKE_CASE		: int						,      _SCREAMING_SNAKE_CASE		: int	):
						return (input_a, input_a).count(0	) % 2



def       _a		(						):
						assert xor_gate(0						,      0	) == 0
						assert xor_gate(0						,      1	) == 1
						assert xor_gate(1						,      0	) == 1
						assert xor_gate(1						,      1	) == 0


if __name__ == "__main__":
						print(xor_gate(0, 0))
						print(xor_gate(0, 1))