




'''simple docstring'''


class     SCREAMING_SNAKE_CASE						:






      def __init__(   self      :     Union[str, Any]	,	lowercase__      :     Union[str, Any]					):


           '''simple docstring'''

           a_    :       str    	=     data
           a_    :       int
           a_    :       Node



def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				Node							):




     """simple docstring"""


     a_    :       Optional[Any]    	=     0
     a_    :       List[str]    	=     x



def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				Node   ,						UpperCamelCase__						:				Node							):




     """simple docstring"""


     a_    :       Any    	=     find_set(_SCREAMING_SNAKE_CASE							), find_set(_SCREAMING_SNAKE_CASE							)
     if x == y:
          return

     elif x.rank > y.rank:
          a_    :       str    	=     x
     else:
          a_    :       Any    	=     y
          if x.rank == y.rank:
               y.rank += 1



def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				Node							):




     """simple docstring"""


     if x != x.parent:
          a_    :       str    	=     find_set(x.parent							)
     return x.parent



def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				Node							):




     """simple docstring"""


     a_    :       Any    	=     ({0, 1, 2}, {3, 4, 5})
     for s in sets:
          if node.data in s:
               return s
     a_    :       int    	=     F"{node.data} is not in {sets}"
     raise ValueError(_SCREAMING_SNAKE_CASE							)



def    _SCREAMING_SNAKE_CASE    (			):




     """simple docstring"""


     a_    :       Optional[Any]    	=     [Node(_SCREAMING_SNAKE_CASE							) for i in range(6							)]
     for v in vertex:
          make_set(_SCREAMING_SNAKE_CASE							)

     union_set(vertex[0]   ,						vertex[1]							)
     union_set(vertex[1]   ,						vertex[2]							)
     union_set(vertex[3]   ,						vertex[4]							)
     union_set(vertex[3]   ,						vertex[5]							)

     for nodea in vertex:
          for nodea in vertex:
               if find_python_set(_SCREAMING_SNAKE_CASE							).isdisjoint(find_python_set(_SCREAMING_SNAKE_CASE							)							):
                    assert find_set(_SCREAMING_SNAKE_CASE							) != find_set(_SCREAMING_SNAKE_CASE							)
               else:
                    assert find_set(_SCREAMING_SNAKE_CASE							) == find_set(_SCREAMING_SNAKE_CASE							)


if __name__ == "__main__":
 test_disjoint_set()






'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


lowerCAmelCase_			:     str							    =     {}

try:
 if not is_sentencepiece_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_			:     Optional[int]							    =     ['CpmTokenizer']

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_			:     Union[str, Any]							    =     ['CpmTokenizerFast']


if TYPE_CHECKING:
 try:
  if not is_sentencepiece_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_cpm import CpmTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_cpm_fast import CpmTokenizerFast

else:
 import sys

 lowerCAmelCase_			:     Any							    =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
