#NEWLINE# def parse( self , image_data ) : #NEWLINE# #INDENT# 'Parses the image file and returns the puzzle as a string of numbers.\n\n        Args:\n            image_data: The data of the image as a string.\n\n        Returns:\n            String of numbers representing the Sudoku puzzle.\n        ' #NEWLINE# self . image = self . _create_image_from_data ( image_data ) #NEWLINE# largest_square = self . _find_largest_square ( ) #NEWLINE# self . resized_largest_square = self . _resize ( largest_square , SUDOKU_RESIZE ) #NEWLINE# puzzle = self . _get_puzzle ( ) #NEWLINE# self . stringified_puzzle = '' . join ( ( str ( image_data ) for n in puzzle . flatten ( ) ) ) #NEWLINE# return self . stringified_puzzle