def __init__(self, rows=None, cols=None, bg_color=None):
self.rows = rows or current_app.config['<STR_LIT>']<EOL>self.cols = cols or current_app.config['<STR_LIT>']<EOL>self.bg_colour = bg_color or current_app.config['<STR_LIT>']<EOL>self._generate_colours()<EOL>m = hashlib.md5()<EOL>m.update(b"<STR_LIT>")<EOL>entropy = len(m.hexdigest()) / <NUM_LIT:2> * <NUM_LIT:8><EOL>if self.rows > <NUM_LIT:15> or self.cols > <NUM_LIT:15>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.digest = hashlib.md5<EOL>self.digest_entropy = entropy<EOL>
Generate identicon image.

        :param rows: The row of pixels in avatar.
        :param columns: The column of pixels in avatar.
        :param bg_color: Backgroud color, pass RGB tuple, for example: (125, 125, 125).
               Set it to ``None`` to use random color.