code: def extended_blank_lines(logical_line,
                           blank_lines,
                           blank_before,
                           indent_level,
                           previous_logical):
      
      if previous_logical.startswith('def '):
          if blank_lines and pycodestyle.DOCSTRING_REGEX.match(logical_line):
              yield (0, 'E303 too many blank lines ({0})'.format(blank_lines))
      elif pycodestyle.DOCSTRING_REGEX.match(previous_logical):
          # Missing blank line between class docstring and method declaration.
          if (
              indent_level and
              not blank_lines and
              not blank_before and
              logical_line.startswith(('def ')) and
              '(self' in logical_line
          ):
              yield (0, 'E301 expected 1 blank line, found 0')
docs: Check for missing blank lines after class declaration.