Parses a Sudoku instance from string input.

        :param string_input: A string containing the Sudoku to parse.
        :type string_input: str
        :return: The parsed Sudoku.
        :rtype: :py:class:`dlxsudoku.sudoku.Sudoku`

def _parse_from_string(string_input):
        """Parses a Sudoku instance from string input.

        :param string_input: A string containing the Sudoku to parse.
        :type string_input: str
        :return: The parsed Sudoku.
        :rtype: :py:class:`dlxsudoku.sudoku.Sudoku`

        """
        # Check if comment line is present.
        read_lines = list(filter(None, string_input.split('\n')))
        if read_lines[0].startswith('#'):
            comment = read_lines.pop(0)
        else:
            comment = ''

        if len(read_lines) > 1:
            # Assume that Sudoku is defined over several rows.
            order = int(math.sqrt(len(read_lines)))
        else:
            # Sudoku is defined on one line.
            order = int(math.sqrt(math.sqrt(len(read_lines[0]))))
            read_lines = filter(lambda x: len(x) == (order ** 2), [read_lines[0][i:(i + order ** 2)] for
                                i in utils.range_(len(read_lines[0])) if i % (order ** 2) == 0])
        matrix = utils.get_list_of_lists(
            order ** 2, order ** 2, fill_with=0)

        for i, line in enumerate(read_lines):
            line = line.strip()
            for j, value in enumerate(line):
                if value.isdigit() and int(value):
                    matrix[i][j] = int(value)
                else:
                    matrix[i][j] = 0
        return order, comment, matrix