code: def get_value(self, exp, rep, tags, which='last'):
          
          history = self.get_history(exp, rep, tags)
          
          # empty histories always return None
          if len(history) == 0:
              return None
              
          # distinguish dictionary (several tags) from list
          if type(history) == dict:
              for h in history:
                  if which == 'last':
                      history[h] = history[h][-1]
                  if which == 'min':
                      history[h] = min(history[h])
                  if which == 'max':
                      history[h] = max(history[h])
                  if type(which) == int:
                      history[h] = history[h][which]
              return history
              
          else:
              if which == 'last':
                  return history[-1]
              if which == 'min':
                  return min(history)
              if which == 'max':
                  return max(history)
              if type(which) == int:
                  return history[which]
              else: 
                  return None
docs: Like get_history(..) but returns only one single value rather
              than the whole list. 
              tags can be a string or a list of strings. if tags is a string,
              the history is returned as a single value, if tags is a list of 
              strings, history is returned as a dictionary of values.
              'which' can be one of the following:
                  last: returns the last value of the history
                   min: returns the minimum value of the history
                   max: returns the maximum value of the history
                     #: (int) returns the value at that index