






"""simple docstring"""





import posixpath
from pathlib import Path
from unittest.mock import patch

import pytest
from fsspec.implementations.local import AbstractFileSystem, LocalFileSystem, stringify_path
from fsspec.registry import _registry as _fsspec_registry
class  __lowerCamelCase     (	__UpperCamelCase	):
   a   :					Dict			    ="""mock"""

   def __init__(       self			,					*snake_case_			,					snake_case_			,					**snake_case_   )		->							Any:
       super().__init__()
       UpperCamelCase__								=     LocalFileSystem(*__UpperCamelCase			,					**__UpperCamelCase   )
       UpperCamelCase__								=     Path(__UpperCamelCase   ).resolve().as_posix() + """/"""

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							int:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.mkdir(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							str:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.makedirs(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							List[str]:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.rmdir(__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					snake_case_=True			,					*snake_case_			,					**snake_case_   )		->							Tuple:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       UpperCamelCase__								=     self._fs.ls(__UpperCamelCase			,					detail=__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )
       if detail:
           return [{**info, "name": info["name"][len(self.local_root_dir   ) :]} for info in out]
       else:
           return [name[len(self.local_root_dir   ) :] for name in out]

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							List[Any]:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       UpperCamelCase__								=     dict(self._fs.info(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )   )
       UpperCamelCase__								=     out["""name"""][len(self.local_root_dir   ) :]
       return out

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							Tuple:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.cp_file(__UpperCamelCase			,					__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							int:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.rm_file(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							str:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.rm(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					*snake_case_			,					**snake_case_   )		->							Optional[Any]:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs._open(__UpperCamelCase			,					*__UpperCamelCase			,					**__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							Tuple:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.created(__UpperCamelCase   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							Any:
       UpperCamelCase__								=     posixpath.join(self.local_root_dir			,					self._strip_protocol(__UpperCamelCase   )   )
       return self._fs.modified(__UpperCamelCase   )







   @classmethod
   def     SCREAMING_SNAKE_CASE__			(       cls			,					snake_case_   )		->							str:
       UpperCamelCase__								=     stringify_path(__UpperCamelCase   )
       if path.startswith('mock://'   ):
           UpperCamelCase__								=     path[7:]
       return path







class  __lowerCamelCase     (	__UpperCamelCase	):
   a   :					int			    ="""tmp"""
   a   :					Dict			    =None

   def __init__(       self			,					*snake_case_			,					**snake_case_   )		->							Tuple:
       assert self.tmp_dir is not None, "TmpDirFileSystem.tmp_dir is not set"
       super().__init__(*__UpperCamelCase			,					**__UpperCamelCase			,					local_root_dir=self.tmp_dir			,					auto_mkdir=__UpperCamelCase   )







   @classmethod
   def     SCREAMING_SNAKE_CASE__			(       cls			,					snake_case_   )		->							Tuple:
       UpperCamelCase__								=     stringify_path(__UpperCamelCase   )
       if path.startswith('tmp://'   ):
           UpperCamelCase__								=     path[6:]
       return path







@pytest.fixture
def 	lowerCAmelCase_(			)       ->						Optional[int]:
    """simple docstring"""

    UpperCamelCase__								=     MockFileSystem
    UpperCamelCase__								=     TmpDirFileSystem
    yield
    del _fsspec_registry["mock"]
    del _fsspec_registry["tmp"]







@pytest.fixture
def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       )       ->						Tuple:
    """simple docstring"""

    UpperCamelCase__								=     tmp_path_factory.mktemp('mockfs'       )
    return MockFileSystem(local_root_dir=SCREAMING_SNAKE_CASE			,						auto_mkdir=SCREAMING_SNAKE_CASE       )







@pytest.fixture
def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       )       ->						List[Any]:
    """simple docstring"""

    UpperCamelCase__								=     tmp_path_factory.mktemp('tmpfs'       )
    with patch.object(SCREAMING_SNAKE_CASE			,						'tmp_dir'			,						SCREAMING_SNAKE_CASE       ):
        yield TmpDirFileSystem()






'''simple docstring'''







def 				_snake_case (		lowercase = 2_0						)       ->       int:

				try:
								__a       :     Optional[Any]								=	int(lowercase						)
				except (TypeError, ValueError):
								raise TypeError("""Parameter n must be int or castable to int."""						)
				if n <= 0:
								raise ValueError("""Parameter n must be greater than or equal to one."""						)
				__a       :     List[Any]								=	0
				while 1:
								i += n * (n - 1)
								__a       :     Union[str, Any]								=	0
								for j in range(2			,    lowercase						):
												if i % j != 0:
																__a       :     Any								=	1
																break
								if nfound == 0:
												if i == 0:
																__a       :     List[str]								=	1
												return i
				return None


if __name__ == "__main__":
					print(f'''{solution() = }''')