code: def check_docstring_sections(self, definition, docstring):
          
          if not docstring:
              return
  
          lines = docstring.split("\n")
          if len(lines) < 2:
              return
  
          lower_section_names = [s.lower() for s in self.SECTION_NAMES]
  
          def _suspected_as_section(_line):
              result = self._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(self._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 self._is_a_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
              new_ctx = SectionContext(a.section_name,
                                       a.previous_line,
                                       a.line,
                                       lines[a.original_index + 1:end],
                                       a.original_index,
                                       b is None)
              for err in self._check_section(docstring, definition, new_ctx):
                  yield err
docs: D21{4,5}, D4{05,06,07,08,09,10}: Docstring sections checks.
  
          Check the general format of a sectioned docstring:
              '''This is my one-liner.
  
              Short Summary
              -------------
              This is my summary.
  
              Returns
              -------
              None.
  
              '''
  
          Section names appear in `SECTION_NAMES`.