parameters: (self, block)
docstring: Determine state of `block`.
docstring_summary: Determine state of `block`.
docstring_tokens: Determine state of block .
function: def set_state(self, block):
          """Determine state of `block`."""
          for line in block:
              # skip documentation lines (commented, blank or blank comment)
              if (line.startswith(self.comment_string)
                  or not line.rstrip()
                  or line.rstrip() == self.comment_string.rstrip()
                 ):
                  continue
              # non-commented line found:
              if self.state == "":
                  self.state = "header"
              else:
                  self.state = "code_block"
              break
          else:
              # no code line found
              # keep state if the block is just a blank line
              # if len(block) == 1 and self._is_blank_codeline(line):
              #     return
              self.state = "documentation"
function_tokens: def set_state ( self , block ) : for line in block : # skip documentation lines (commented, blank or blank comment) if ( line . startswith ( self . comment_string ) or not line . rstrip ( ) or line . rstrip ( ) == self . comment_string . rstrip ( ) ) : continue # non-commented line found: if self . state == "" : self . state = "header" else : self . state = "code_block" break else : # no code line found # keep state if the block is just a blank line # if len(block) == 1 and self._is_blank_codeline(line): #     return self . state = "documentation"