def dim(self, dim):
<EOL>contrast = <NUM_LIT:0><EOL>if not dim:<EOL><INDENT>if self._vccstate == SSD1306_EXTERNALVCC:<EOL><INDENT>contrast = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>contrast = <NUM_LIT><EOL><DEDENT><DEDENT>
Adjusts contrast to dim the display if dim is True, otherwise sets the
        contrast to normal brightness if dim is False.