'''simple docstring'''





from collections import defaultdict





def   lowerCAmelCase_ (				__lowerCAmelCase = 5						)->  int:






      '''simple docstring'''





      UpperCAmelCase    : List[str]      =defaultdict(__lowerCAmelCase						)
      UpperCAmelCase    : Tuple      =0

      while True:
            UpperCAmelCase    : Any      =get_digits(__lowerCAmelCase						)
            freqs[digits].append(__lowerCAmelCase						)

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

            num += 1





def   lowerCAmelCase_ (				__lowerCAmelCase						)->  str:






      '''simple docstring'''





      return "".join(sorted(str(num**3						)						)						)


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

import json
import os
import tempfile
import unittest

from transformers.modelcard import ModelCard







class 			__snake_case   (     unittest.TestCase   ):
 def 	UpperCAmelCase__       (  self						)	->							Optional[Any]:
       '''simple docstring'''





       UpperCAmelCase    : List[str]      ={
           '''model_details''': {
               '''Organization''': '''testing''',
               '''Model date''': '''today''',
               '''Model version''': '''v2.1, Developed by Test Corp in 2019.''',
               '''Architecture''': '''Convolutional Neural Network.''',
           },
           '''metrics''': '''BLEU and ROUGE-1''',
           '''evaluation_data''': {
               '''Datasets''': {'''BLEU''': '''My-great-dataset-v1''', '''ROUGE-1''': '''My-short-dataset-v2.1'''},
               '''Preprocessing''': '''See details on https://arxiv.org/pdf/1810.03993.pdf''',
           },
           '''training_data''': {
               '''Dataset''': '''English Wikipedia dump dated 2018-12-01''',
               '''Preprocessing''': (
                   '''Using SentencePiece vocabulary of size 52k tokens. See details on'''
                   ''' https://arxiv.org/pdf/1810.03993.pdf'''
               ),
           },
           '''quantitative_analyses''': {'''BLEU''': 55.1, '''ROUGE-1''': 76},
       }
 def 	UpperCAmelCase__       (  self						)	->							Dict:
       '''simple docstring'''





       UpperCAmelCase    : Optional[Any]      =ModelCard.from_dict(self.inputs_dict						)
       self.assertTrue(hasattr(snake_case__		,   '''model_details'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''intended_use'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''factors'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''metrics'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''evaluation_data'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''training_data'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''quantitative_analyses'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''ethical_considerations'''						)						)
       self.assertTrue(hasattr(snake_case__		,   '''caveats_and_recommendations'''						)						)
 def 	UpperCAmelCase__       (  self						)	->							Tuple:
       '''simple docstring'''





       UpperCAmelCase    : Optional[Any]      =ModelCard.from_dict(self.inputs_dict						)
       UpperCAmelCase    : int      =json.loads(modelcard.to_json_string()						)
       for key, value in self.inputs_dict.items():
             self.assertEqual(obj[key]		,   snake_case__						)
 def 	UpperCAmelCase__       (  self						)	->							Tuple:
       '''simple docstring'''





       UpperCAmelCase    : List[str]      =ModelCard.from_dict(self.inputs_dict						)

       with tempfile.TemporaryDirectory() as tmpdirname:
             UpperCAmelCase    : Optional[Any]      =os.path.join(snake_case__		,   '''modelcard.json'''						)
             model_card_first.to_json_file(snake_case__						)
             UpperCAmelCase    : Tuple      =ModelCard.from_json_file(snake_case__						)

       self.assertEqual(model_card_second.to_dict()		,   model_card_first.to_dict()						)






 def 	UpperCAmelCase__       (  self						)	->							str:
       '''simple docstring'''





       UpperCAmelCase    : Optional[int]      =ModelCard.from_dict(self.inputs_dict						)

       with tempfile.TemporaryDirectory() as tmpdirname:
             model_card_first.save_pretrained(snake_case__						)
             UpperCAmelCase    : Dict      =ModelCard.from_pretrained(snake_case__						)

       self.assertEqual(model_card_second.to_dict()		,   model_card_first.to_dict()						)
