'Returns a history object for the key (which is a menu name).
If no object exist yet, a new one is created and registered.
:param key'

def get_history(self, key):

    if (key in self._table):
        result = self._table[key]
    else:
        result = history()
        self._table[key] = result
    return result
