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: Check if the suspected context is really a section header.
  
  Lets have a look at the following example docstring:
      '''Title.
  
      Some part of the docstring that specifies what the function
      returns. <----- Not a real section name. It has a suffix and the
                      previous line is not empty and does not end with
                      a punctuation sign.
  
      This is another line in the docstring. It describes stuff,
      but we forgot to add a blank line between it and the section name.
      Parameters  <-- A real section name. The previous line ends with
      ----------      a period, therefore it is in a new
                      grammatical context.
      param : int
      examples : list  <------- Not a section - previous line doesn't end
          A list of examples.   with punctuation.
      notes : list  <---------- Not a section - there's text after the
          A list of notes.      colon.
  
      Notes:  <--- Suspected as a context because there's a suffix to the
      -----        section, but it's a colon so it's probably a mistake.
      Bla.
  
      '''
  
  To make sure this is really a section we check these conditions:
      * There's no suffix to the section name or it's just a colon AND
      * The previous line is empty OR it ends with punctuation.
  
  If one of the conditions is true, we will consider the line as
  a section name.
docstr_tok: ["Check","if","the","suspected","context","is","really","a","section","header",".","Lets","have","a","look","at","the","following","example","docstring",":","``","'Title",".","Some","part","of","the","docstring","that","specifies","what","the","function","returns",".","<","--","--","-","Not","a","real","section","name",".","It","has","a","suffix","and","the","previous","line","is","not","empty","and","does","not","end","with","a","punctuation","sign",".","This","is","another","line","in","the","docstring",".","It","describes","stuff",",","but","we","forgot","to","add","a","blank","line","between","it","and","the","section","name",".","Parameters","<","--","A","real","section","name",".","The","previous","line","ends","with","--","--","--","--","--","a","period",",","therefore","it","is","in","a","new","grammatical","context",".","param",":","int","examples",":","list","<","--","--","--","-","Not","a","section","-","previous","line","does","n't","end","A","list","of","examples",".","with","punctuation",".","notes",":","list","<","--","--","--","--","--","Not","a","section","-","there","'s","text","after","the","A","list","of","notes",".","colon",".","Notes",":","<","--","-","Suspected","as","a","context","because","there","'s","a","suffix","to","the","--","--","-","section",",","but","it","'s","a","colon","so","it","'s","probably","a","mistake",".","Bla.","``","'","To","make","sure","this","is","really","a","section","we","check","these","conditions",":","*","There","'s","no","suffix","to","the","section","name","or","it","'s","just","a","colon","AND","*","The","previous","line","is","empty","OR","it","ends","with","punctuation",".","If","one","of","the","conditions","is","true",",","we","will","consider","the","line","as","a","section","name","."]
code: def _is_docstring_section(context):
      """Check if the suspected context is really a section header.
  
      Lets have a look at the following example docstring:
          '''Title.
  
          Some part of the docstring that specifies what the function
          returns. <----- Not a real section name. It has a suffix and the
                          previous line is not empty and does not end with
                          a punctuation sign.
  
          This is another line in the docstring. It describes stuff,
          but we forgot to add a blank line between it and the section name.
          Parameters  <-- A real section name. The previous line ends with
          ----------      a period, therefore it is in a new
                          grammatical context.
          param : int
          examples : list  <------- Not a section - previous line doesn't end
              A list of examples.   with punctuation.
          notes : list  <---------- Not a section - there's text after the
              A list of notes.      colon.
  
          Notes:  <--- Suspected as a context because there's a suffix to the
          -----        section, but it's a colon so it's probably a mistake.
          Bla.
  
          '''
  
      To make sure this is really a section we check these conditions:
          * There's no suffix to the section name or it's just a colon AND
          * The previous line is empty OR it ends with punctuation.
  
      If one of the conditions is true, we will consider the line as
      a section name.
      """
      section_name_suffix = (
          context.line.strip()
          .lstrip(context.section_name.strip())
          .strip()
      )
  
      section_suffix_is_only_colon = section_name_suffix == ":"
  
      punctuation = [",", ";", ".", "-", "\\", "/", "]", "}", ")"]
      prev_line_ends_with_punctuation = any(
          context.previous_line.strip().endswith(x) for x in punctuation
      )
  
      this_line_looks_like_a_section_name = (
          is_blank(section_name_suffix) or section_suffix_is_only_colon
      )
  
      prev_line_looks_like_end_of_paragraph = (
          prev_line_ends_with_punctuation
          or is_blank(context.previous_line)
      )
  
      return (
          this_line_looks_like_a_section_name
          and prev_line_looks_like_end_of_paragraph
      )
  
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 24 for calling the ConventionChecker obj's underlying member method code with example usage: obj._is_docstring_section(context) and returns: unknown