old_contents: # Tai Sakuma <tai.sakuma@cern.ch>
  
  ##____________________________________________________________________________||
  class GenericKeyComposer(object):
      def __init__(self, varNames, binnings, indices = None):
          self._varNames = varNames
          self._binnings = binnings
          self._indices = indices if indices is not None else [None]*len(self._varNames)
  
      def begin(self, event): pass
  
      def __call__(self, event):
          ret = [ ]
          for varName, binning, index in zip(self._varNames, self._binnings, self._indices):
              var = getattr(event, varName)
              if index is not None:
                  if len(var) <= index: return ()
                  var = var[index]
              var_bin = binning(var)
              if var_bin is None: return ()
              ret.append(var_bin)
          return (tuple(ret), )
  
  ##____________________________________________________________________________||
  class GenericKeyComposerFactory(object):
      def __init__(self, varNames, binnings, indices = None):
          self.varNames = varNames
          self.binnings = binnings
          self.indices = indices
      def __call__(self):
          return GenericKeyComposer(varNames = self.varNames, binnings = self.binnings, indices = self.indices)
  
  ##____________________________________________________________________________||
  
new_contents: # Tai Sakuma <tai.sakuma@cern.ch>
  
  ##____________________________________________________________________________||
  class GenericKeyComposer(object):
      def __init__(self, varNames, binnings, indices = None):
          self.varNames = varNames
          self.binnings = binnings
          self.indices = indices if indices is not None else [None]*len(self.varNames)
  
      def begin(self, event): pass
  
      def __call__(self, event):
          ret = [ ]
          for varName, binning, index in zip(self.varNames, self.binnings, self.indices):
              var = getattr(event, varName)
              if index is not None:
                  if len(var) <= index: return ()
                  var = var[index]
              var_bin = binning(var)
              if var_bin is None: return ()
              ret.append(var_bin)
          return (tuple(ret), )
  
  ##____________________________________________________________________________||
  class GenericKeyComposerFactory(object):
      def __init__(self, varNames, binnings, indices = None):
          self.varNames = varNames
          self.binnings = binnings
          self.indices = indices
      def __call__(self):
          return GenericKeyComposer(varNames = self.varNames, binnings = self.binnings, indices = self.indices)
  
  ##____________________________________________________________________________||
  
subject: remove "_" from variable names in GenericKeyComposer