code: def _rstrip(line, JUNK="\n \t"):
      """Return line stripped of trailing spaces, tabs, newlines.
  
      Note that line.rstrip() instead also strips sundry control characters,
      but at least one known Emacs user expects to keep junk like that, not
      mentioning Barry by name or anything <wink>.
      """
  
      i = len(line)
      while i > 0 and line[i - 1] in JUNK:
          i -= 1
      return line[:i]
  
file_path: Theano/theano/misc/hooks/reindent.py
imports: from __future__ import absolute_import, print_function, division
  import tokenize
  import os, shutil
  import sys
  from six.moves import xrange
label_desc: Use image node_id 5 for calling a global function with example usage: _rstrip(line, JUNK) and returns: line