


"""simple docstring"""




import logging
import os

from .state import PartialState
class 					__lowerCAmelCase					(   logging.LoggerAdapter       ):


		'''simple docstring'''



		@staticmethod
		def 			__UpperCAmelCase       (  _a      ):
				__a           =			PartialState()
				return not main_process_only or (main_process_only and state.is_main_process)





		def 			__UpperCAmelCase       (  self							, _a							, _a							, *_a							, **_a      ):
				if PartialState._shared_state == {}:
						raise RuntimeError(
						    '''You must initialize the accelerate state by calling either `PartialState()` or `Accelerator()` before using the logging utility.'''      )
				__a           =			kwargs.pop('''main_process_only'''							, _a      )
				__a           =			kwargs.pop('''in_order'''							, _a      )

				if self.isEnabledFor(_a      ):
						if self._should_log(_a      ):
								__a      ,     __a           =			self.process(_a							, _a      )
								self.logger.log(_a							, _a							, *_a							, **_a      )

						elif in_order:
								__a           =			PartialState()
								for i in range(state.num_processes      ):
										if i == state.process_index:
												__a      ,     __a           =			self.process(_a							, _a      )
												self.logger.log(_a							, _a							, *_a							, **_a      )
										state.wait_for_everyone()







def        lowercase							(		lowerCAmelCase__ :     str    ,					lowerCAmelCase__ :     str = None			) ->      Any:
		if log_level is None:
				__a           =			os.environ.get('''ACCELERATE_LOG_LEVEL'''    ,					lowerCAmelCase__			)
		__a           =			logging.getLogger(lowerCAmelCase__			)
		if log_level is not None:
				logger.setLevel(log_level.upper()			)
				logger.root.setLevel(log_level.upper()			)
		return MultiProcessAdapter(lowerCAmelCase__    ,					{}			)









'''simple docstring'''



from itertools import count







def    a__       (  a__ = 50						):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE     =      [1] * min_block_length

     for n in count(a__						):
          fill_count_functions.append(1						)

          for block_length in range(a__      ,    n + 1						):
               for block_start in range(n - block_length						):
                    fill_count_functions[n] += fill_count_functions[
                        n - block_start - block_length - 1
                    ]

               fill_count_functions[n] += 1

          if fill_count_functions[n] > 1_00_00_00:
               break

     return n


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






