#NEWLINE# @ classmethod #NEWLINE# def _generate_random_part( cls , length ) : #NEWLINE# #INDENT# 'Generate a random string.\n\n        :param length: The length of the random string.\n        :returns: string, randomly-generated string of the specified length\n                  containing only characters from\n                  cls.RESOURCE_NAME_ALLOWED_CHARACTERS\n        ' #NEWLINE# return '' . join ( ( random . choice ( cls . RESOURCE_NAME_ALLOWED_CHARACTERS ) for i in range ( cls ) ) )