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: Generate `SectionContext` objects for valid sections.
  
  Given a list of `valid_section_names`, generate an
  `Iterable[SectionContext]` which provides:
      * Section Name
      * String value of the previous line
      * The section line
      * Following lines till the next section
      * Line index of the beginning of the section in the docstring
      * Boolean indicating whether the section is the last section.
  for each valid section.
docstr_tok: ["Generate","`","SectionContext","`","objects","for","valid","sections",".","Given","a","list","of","`","valid_section_names","`",",","generate","an","`","Iterable","[","SectionContext","]","`","which","provides",":","*","Section","Name","*","String","value","of","the","previous","line","*","The","section","line","*","Following","lines","till","the","next","section","*","Line","index","of","the","beginning","of","the","section","in","the","docstring","*","Boolean","indicating","whether","the","section","is","the","last","section",".","for","each","valid","section","."]
code: def _get_section_contexts(lines, valid_section_names):
      """Generate `SectionContext` objects for valid sections.
  
      Given a list of `valid_section_names`, generate an
      `Iterable[SectionContext]` which provides:
          * Section Name
          * String value of the previous line
          * The section line
          * Following lines till the next section
          * Line index of the beginning of the section in the docstring
          * Boolean indicating whether the section is the last section.
      for each valid section.
  
      """
      lower_section_names = [s.lower() for s in valid_section_names]
  
      def _suspected_as_section(_line):
          result = get_leading_words(_line.lower())
          return result in lower_section_names
  
      # Finding our suspects.
      suspected_section_indices = [
          i
          for i, line in enumerate(lines)
          if _suspected_as_section(line)
      ]
  
      SectionContext = namedtuple(
          "SectionContext",
          (
              "section_name",
              "previous_line",
              "line",
              "following_lines",
              "original_index",
              "is_last_section",
          ),
      )
  
      # First - create a list of possible contexts. Note that the
      # `following_lines` member is until the end of the docstring.
      contexts = (
          SectionContext(
              get_leading_words(lines[i].strip()),
              lines[i - 1],
              lines[i],
              lines[i + 1 :],
              i,
              False,
          )
          for i in suspected_section_indices
      )
  
      # Now that we have manageable objects - rule out false positives.
      contexts = (
          c
          for c in contexts
          if ConventionChecker._is_docstring_section(c)
      )
  
      # Now we shall trim the `following lines` field to only reach the
      # next section name.
      for a, b in pairwise(contexts, None):
          end = -1 if b is None else b.original_index
          yield SectionContext(
              a.section_name,
              a.previous_line,
              a.line,
              lines[a.original_index + 1 : end],
              a.original_index,
              b is None,
          )
  
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 34 for calling the ConventionChecker obj's underlying member method code with example usage: obj._get_section_contexts(lines, valid_section_names) and returns: unknown