'Add a new event for a defined typeclass.
Args:
typeclass (str): the path leading to the typeclass.
name (str): the name of the event to add.
variables (list of str): list of variable names for this event.
help_text (str): the long help text of the event.
custom_call (callable or None): the function to be called
when the event fires.
custom_add (callable or None): the function to be called when
a callback is added.'

def add_event(self, typeclass, name, variables, help_text, custom_call, custom_add):

    if (typeclass not in self.ndb.events):
        self.ndb.events[typeclass] = {}
    events = self.ndb.events[typeclass]
    if (name not in events):
        events[name] = (variables, help_text, custom_call, custom_add)
