





"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


a__					:     Union[str, Any]							=				{
    """configuration_swin2sr""": ["""SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP""", """Swin2SRConfig"""],
}


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a__					:     List[str]							=				[
       """SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """Swin2SRForImageSuperResolution""",
       """Swin2SRModel""",
       """Swin2SRPreTrainedModel""",
   ]


try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a__					:     List[Any]							=				["""Swin2SRImageProcessor"""]


if TYPE_CHECKING:
   from .configuration_swinasr import SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinaSRConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_swinasr import (
          SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST,
          SwinaSRForImageSuperResolution,
          SwinaSRModel,
          SwinaSRPreTrainedModel,
      )

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .image_processing_swinasr import SwinaSRImageProcessor


else:
   import sys

   a__					:     Tuple							=				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






"""simple docstring"""


class      lowercase_				:

       def __init__(			self   ,					__SCREAMING_SNAKE_CASE     ):






        '''simple docstring'''

        snake_case__    							=				data
        snake_case__    							=				42
        snake_case__    							=				42





def 							a__			(  _UpperCAmelCase	)    ->  None:

 '''simple docstring'''






 snake_case__    							=				0
 snake_case__    							=				x





def 							a__			(  _UpperCAmelCase	,     _UpperCAmelCase	)    ->  None:

 '''simple docstring'''






 snake_case__							,   snake_case__    							=				find_set(_UpperCAmelCase	), find_set(_UpperCAmelCase	)
 if x == y:
  return

 elif x.rank > y.rank:
  snake_case__    							=				x
 else:
  snake_case__    							=				y
  if x.rank == y.rank:
   y.rank += 1





def 							a__			(  _UpperCAmelCase	)    ->  Node:

 '''simple docstring'''






 if x != x.parent:
  snake_case__    							=				find_set(x.parent	)
 return x.parent





def 							a__			(  _UpperCAmelCase	)    ->  set:

 '''simple docstring'''






 snake_case__    							=				({0, 1, 2}, {3, 4, 5})
 for s in sets:
  if node.data in s:
   return s
 snake_case__    							=				f"{node.data} is not in {sets}"
 raise ValueError(_UpperCAmelCase	)





def 							a__			(  )    ->  None:

 '''simple docstring'''






 snake_case__    							=				[Node(_UpperCAmelCase	) for i in range(6	)]
 for v in vertex:
  make_set(_UpperCAmelCase	)

 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(_UpperCAmelCase	).isdisjoint(find_python_set(_UpperCAmelCase	)	):
    assert find_set(_UpperCAmelCase	) != find_set(_UpperCAmelCase	)
   else:
    assert find_set(_UpperCAmelCase	) == find_set(_UpperCAmelCase	)


if __name__ == "__main__":
   test_disjoint_set()

