original_docstring: 
      THStack is just a collection of histograms, so call the re-binning on each histogram
      separately
      
docstring: THStack is just a collection of histograms, so call the re-binning on each histogram
  separately
docstring_tokens: THStack is just a collection of histograms so call the re - binning on each histogram separately
code: def rebin_THStack(stack, bins_array):
      '''
      THStack is just a collection of histograms, so call the re-binning on each histogram
      separately
      '''
      
      
  
      tempStack = THStack('Background stack rebinned','')
      #tempStack.SetDirectory(0)
      if is_stack(stack):
          histList = stack.GetHists()
          for hist in histList: 
              if type(bins_array) == int:
                  tempHist = hist.Rebin(bins_array)
              else:
                  tempHist = rebin_plot(hist, bins_array)
              tempHist.SetDirectory(0)
              tempStack.Add(tempHist)
      else:
          print 'ERROR, passed object is not a THStack'
          print element.GetName()
      return tempStack
code_tokens: def rebin_THStack ( stack , bins_array ) : tempStack = THStack ( 'Background stack rebinned' , '' ) if is_stack ( stack ) : histList = stack . GetHists ( ) for hist in histList : if type ( bins_array ) == int : tempHist = hist . Rebin ( bins_array ) else : tempHist = rebin_plot ( hist , bins_array ) tempHist . SetDirectory ( 0 ) tempStack . Add ( tempHist ) else : print 'ERROR, passed object is not a THStack' print element . GetName ( ) return tempStack
short_docstring: THStack is just a collection of histograms, so call the re-binning on each histogram
  separately
short_docstring_tokens: THStack is just a collection of histograms so call the re - binning on each histogram separately
comment: '''
      THStack is just a collection of histograms, so call the re-binning on each histogram
      separately
      '''$SEP$#tempStack.SetDirectory(0)