class_docstr: Checker for PEP 257, NumPy and Google conventions.
  
  D10x: Missing docstrings
  D20x: Whitespace issues
  D30x: Docstring formatting
  D40x: Docstring content issues
class_docstr_tok: ["Checker","for","PEP","257",",","NumPy","and","Google","conventions",".","D10x",":","Missing","docstrings","D20x",":","Whitespace","issues","D30x",":","Docstring","formatting","D40x",":","Docstring","content","issues"]
docstr: D20{1,2}: No blank lines allowed around function/method docstring.
  
  There's no blank line either before or after the docstring unless directly
  followed by an inner function or class.
docstr_tok: ["D20","{","1,2","}",":","No","blank","lines","allowed","around","function\/method","docstring",".","There","'s","no","blank","line","either","before","or","after","the","docstring","unless","directly","followed","by","an","inner","function","or","class","."]
code: def check_no_blank_before(self, function, docstring):  # def
      """D20{1,2}: No blank lines allowed around function/method docstring.
  
      There's no blank line either before or after the docstring unless directly
      followed by an inner function or class.
      """
      if docstring:
          before, _, after = function.source.partition(docstring)
          blanks_before = list(map(is_blank, before.split("\n")[:-1]))
          blanks_after = list(map(is_blank, after.split("\n")[1:]))
          blanks_before_count = sum(
              takewhile(bool, reversed(blanks_before))
          )
          blanks_after_count = sum(takewhile(bool, blanks_after))
          if blanks_before_count != 0:
              yield violations.D201(blanks_before_count)
          if not all(blanks_after) and blanks_after_count != 0:
              # Report a D202 violation if the docstring is followed by a blank line
              # and the blank line is not itself followed by an inner function or
              # class.
              if not (
                  blanks_after_count == 1
                  and re(r"\s+(?:(?:class|def|async def)\s|@)").match(
                      after
                  )
              ):
                  yield violations.D202(blanks_after_count)
  
imports: import ast
  import string
  import tokenize
  from collections import namedtuple
  from itertools import chain, takewhile
  from re import compile
  from textwrap import dedent
  from .None import violations
  from .config import IllegalConfiguration
  from .parser import AllError, Class, Definition, Function, Method, Module, NestedClass, NestedFunction, Package, ParseError, Parser, StringIO
  from .utils import common_prefix_length, is_blank, log, pairwise, strip_non_alphanumeric
  from .wordlists import IMPERATIVE_BLACKLIST, IMPERATIVE_VERBS, stem
label_desc: Use image node_id 6 for calling the ConventionChecker obj's underlying member method code with example usage: obj.check_no_blank_before(function, docstring) without return types