parameters: (text)
docstring: Given text in "news" format, attempt to remove a signature block.
  
      As a rough heuristic, we assume that signatures are set apart by either
      a blank line or a line made of hyphens, and that it is the last such line
      in the file (disregarding blank lines at the end).
  
      Parameters
      ----------
      text : string
          The text from which to remove the signature block.
docstring_summary: Given text in "news" format, attempt to remove a signature block.
docstring_tokens: Given text in news format attempt to remove a signature block .
function: def strip_newsgroup_footer(text):
      """
      Given text in "news" format, attempt to remove a signature block.
  
      As a rough heuristic, we assume that signatures are set apart by either
      a blank line or a line made of hyphens, and that it is the last such line
      in the file (disregarding blank lines at the end).
  
      Parameters
      ----------
      text : string
          The text from which to remove the signature block.
      """
      lines = text.strip().split('\n')
      for line_num in range(len(lines) - 1, -1, -1):
          line = lines[line_num]
          if line.strip().strip('-') == '':
              break
  
      if line_num > 0:
          return '\n'.join(lines[:line_num])
      else:
          return text
function_tokens: def strip_newsgroup_footer ( text ) : lines = text . strip ( ) . split ( '\n' ) for line_num in range ( len ( lines ) - 1 , - 1 , - 1 ) : line = lines [ line_num ] if line . strip ( ) . strip ( '-' ) == '' : break if line_num > 0 : return '\n' . join ( lines [ : line_num ] ) else : return text