



'''simple docstring'''






import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


lowerCAmelCase:      Any		 =		re.compile(r'^(?P<major>\d+)' r'\.(?P<minor>\d+)' r'\.(?P<patch>\d+)$')

@total_ordering
@dataclass
class 							a__:
				lowercase__				=					42
				lowercase__				=					None
				lowercase__				=					None
				lowercase__				=					None
				lowercase__				=					None







				def     lowercase_ (   self				:						Optional[Any]			):
						a		:      Optional[int]       =  _str_to_version_tuple(self.version_str			)







				def __repr__(   self				:						Optional[int]			):
						return F"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""







				@property
				def     lowercase_ (   self				:						List[Any]			):
						return self.major, self.minor, self.patch







				def     lowercase_ (   self				:						Dict		,    __snake_case				:						Dict			):





						if isinstance(UpperCamelCase_		,    UpperCamelCase_			):
								return Version(UpperCamelCase_			)
						elif isinstance(UpperCamelCase_		,    UpperCamelCase_			):
								return other
						raise TypeError(F"""{other} (type {type(UpperCamelCase_			)}) cannot be compared to version."""			)







				def __eq__(   self				:						int		,    __snake_case				:						Union[str, Any]			):





						try:
								a		:      List[str]       =  self._validate_operand(UpperCamelCase_			)
						except (TypeError, ValueError):
								return False
						else:
								return self.tuple == other.tuple







				def __lt__(   self				:						int		,    __snake_case				:						List[Any]			):
						a		:      List[Any]       =  self._validate_operand(UpperCamelCase_			)
						return self.tuple < other.tuple







				def __hash__(   self				:						List[Any]			):
						return hash(_version_tuple_to_str(self.tuple			)			)







				@classmethod
				def     lowercase_ (   cls				:						Any		,    __snake_case				:						List[str]			):
						a		:      Dict       =  {f.name for f in dataclasses.fields(cls			)}
						return cls(**{k: v for k, v in dic.items() if k in field_names}			)







				def     lowercase_ (   self				:						Dict			):
						return self.version_str
def    lowerCamelCase__ (		_A       ):
		a		:      int       =  _VERSION_REG.match(_lowercase       )
		if not res:
				raise ValueError(f"""Invalid version \'{version_str}\'. Format should be x.y.z with {{x,y,z}} being digits."""       )
		return tuple(int(_lowercase       ) for v in [res.group('major'       ), res.group('minor'       ), res.group('patch'       )]       )

def    lowerCamelCase__ (		_A       ):
		return ".".join(str(_lowercase       ) for v in version_tuple       )




'''simple docstring'''






from ..utils import DummyObject, requires_backends

class 							a__(      metaclass=lowerCamelCase__			):
    lowercase__				=					["""torch""", """torchsde"""]







    def __init__(   self				:						Any		,    *__snake_case				:						List[str]		,    **__snake_case				:						Tuple			):
      requires_backends(self		,    ['torch', 'torchsde']			)







    @classmethod
    def     lowercase_ (   cls				:						List[Any]		,    *__snake_case				:						str		,    **__snake_case				:						List[Any]			):
      requires_backends(cls		,    ['torch', 'torchsde']			)







    @classmethod
    def     lowercase_ (   cls				:						Dict		,    *__snake_case				:						Optional[Any]		,    **__snake_case				:						str			):
      requires_backends(cls		,    ['torch', 'torchsde']			)