






import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


A__     :      Optional[Any]             =			2 << 20  # 2mb
A__     :      List[str]             =			get_logger(__name__)
class 				_UpperCAmelCase (	A__     ):

				"""simple docstring"""




				def     lowercase__       (					self						:   List[str]  ):

								'''simple docstring'''
								lowercase__       			=      self._options.get_all_options().get('''runner'''  )
								return runner in [None, "DirectRunner", "PortableRunner"]






def   a      (						lowerCamelCase_		,       lowerCamelCase_		,       lowerCamelCase_=False    ):






				'''simple docstring'''
				lowercase__       			=      FileSystems
				if fs.exists(lowerCamelCase_    ):
								if force_upload:
												logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""    )
								else:
												logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""    )
												return
				with fs.create(lowerCamelCase_    ) as remote_file:
								with open(lowerCamelCase_		,       '''rb'''    ) as local_file:
												lowercase__       			=      local_file.read(lowerCamelCase_    )
												while chunk:
																remote_file.write(lowerCamelCase_    )
																lowercase__       			=      local_file.read(lowerCamelCase_    )






def   a      (						lowerCamelCase_		,       lowerCamelCase_		,       lowerCamelCase_=False    ):






				'''simple docstring'''
				lowercase__       			=      FileSystems
				if os.path.exists(lowerCamelCase_    ):
								if force_download:
												logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""    )
								else:
												logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""    )
												return
				with fs.open(lowerCamelCase_    ) as remote_file:
								with open(lowerCamelCase_		,       '''wb'''    ) as local_file:
												lowercase__       			=      remote_file.read(lowerCamelCase_    )
												while chunk:
																local_file.write(lowerCamelCase_    )
																lowercase__       			=      remote_file.read(lowerCamelCase_    )












from collections import defaultdict






def   a      (						lowerCamelCase_ = 5    ):






				'''simple docstring'''
				lowercase__       			=      defaultdict(lowerCamelCase_    )
				lowercase__       			=      0

				while True:
								lowercase__       			=      get_digits(lowerCamelCase_    )
								freqs[digits].append(lowerCamelCase_    )

								if len(freqs[digits]    ) == max_base:
												lowercase__       			=      freqs[digits][0] ** 3
												return base

								num += 1






def   a      (						lowerCamelCase_    ):






				'''simple docstring'''
				return "".join(sorted(str(num**3    )    )    )


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




